Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix packer validate plugin error #536

Merged
merged 2 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
sudo apt-get install -y -qq packer
- name: Packer validate
run: |
packer init .
# Allow beta/test builds to fail validation
packer validate -var-file=mint-beta.pkrvars.hcl . || true
# This runs last to ensure it's exit status is captured
Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,18 @@ If you have a Mint or Ubuntu instance (VM or laptop) that you built yourself,
and wish to use this project to get started with JMU CS software, follow these
steps:

```
```bash
apt-get install ansible git
git clone https://github.com/jmunixusers/cs-vm-build
cd cs-vm-build
ansible-playbook -i hosts -K -t TAGS local.yml
```
or directly from GitHub:

```
```bash
ansible-pull -U https://github.com/jmunixusers/cs-vm-build --directory /tmp/cs-vm-build --purge -i hosts -K -t TAGS
```

where TAGS is a comma separated list (with no spaces) of
cs101, cs149, cs159, cs261, cs361 and/or cs430 as appropriate.

Expand Down Expand Up @@ -155,12 +156,18 @@ A large number of variables can be overridden at once by passing a `var-file`
to Packer. An example of this is provided as `mint-beta.pkrvars.hcl`, and can be used
like this:

`packer build -var-file=mint-beta.pkrvars.hcl -only "*.mint" .`
```bash
packer init .
packer build -var-file=mint-beta.pkrvars.hcl -only "*.mint" .
```

Packer allows further overrides, with precedence given to the last option in the
command. For example, to build a beta image on Windows, use this command:

`packer build -var-file=mint-beta.pkrvars.hcl -var 'audio=dsound' -only "*.mint" .`
```bash
packer init .
packer build -var-file=mint-beta.pkrvars.hcl -var 'audio=dsound' -only "*.mint" .
```

### Building Ubuntu images

Expand All @@ -169,12 +176,18 @@ fact, all previous commands have specifically excluded Ubuntu image builds). By
default, the `packer` configuration will build both a Mint and Ubuntu VM. Try it
with:

`packer build .`
```bash
packer init .
packer build .
```

Much as with the previous commands, you can build only an ubuntu-based image by
running:

`packer build -only "*.ubuntu" .`
```bash
packer init .
packer build -only "*.ubuntu" .
```

Support for building beta variants of Ubuntu images is not currently supported.

Expand Down
6 changes: 6 additions & 0 deletions packer/main.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
packer {
required_version = ">= 1.7.0"
required_plugins {
virtualbox = {
version = "~> 1"
source = "github.com/hashicorp/virtualbox"
}
}
}

source "virtualbox-iso" "base-build" {
Expand Down
Loading