forked from Submitty/Submitty
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from skara9/packer
packer
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Packer | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
packer: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Packer | ||
run: | | ||
brew tap hashicorp/tap | ||
brew install hashicorp/tap/packer | ||
- name: Validate | ||
run: | | ||
packer validate packer/submitty-main.json | ||
- name: Build | ||
run: | | ||
packer build packer/submitty-main.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
GIT_PATH=/usr/local/submitty/GIT_CHECKOUT/Submitty | ||
DISTRO=$(lsb_release -si | tr '[:upper:]' '[:lower:]') | ||
VERSION=$(lsb_release -sr | tr '[:upper:]' '[:lower:]') | ||
mkdir -p ${GIT_PATH}/.vagrant/logs | ||
bash ${GIT_PATH}/.setup/vagrant/setup_vagrant.sh 2>&1 | tee ${GIT_PATH}/.vagrant/logs/submitty-main.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"builders": [ | ||
{ | ||
"type": "virtualbox-iso", | ||
"guest_os_type": "Ubuntu_64", | ||
"iso_url": "https://releases.ubuntu.com/jammy/ubuntu-22.04.3-live-server-amd64.iso", | ||
"iso_checksum": "sha256:a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd", | ||
"ssh_username": "ubuntu", | ||
"ssh_password": "ubuntu", | ||
"ssh_port": 22, | ||
"ssh_wait_timeout": "10m", | ||
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now", | ||
"headless": true, | ||
"vboxmanage": [ | ||
[ | ||
"modifyvm", | ||
"{{.Name}}", | ||
"--memory", | ||
"2048" | ||
], | ||
[ | ||
"modifyvm", | ||
"{{.Name}}", | ||
"--cpus", | ||
"2" | ||
] | ||
], | ||
"boot_command": [ | ||
"<esc><esc><enter><wait>", | ||
"/install/vmlinuz noapic ", | ||
"file=/floppy/preseed.cfg ", | ||
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", | ||
"hostname=ubuntu ", | ||
"fb=false debconf/frontend=noninteractive ", | ||
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", | ||
"keyboard-configuration/variant=USA console-setup/ask_detect=false ", | ||
"initrd=/install/initrd.gz -- <enter>" | ||
], | ||
"boot_wait": "10s" | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "shell", | ||
"script": "./provisioner.sh" | ||
} | ||
], | ||
"post-processors": [ | ||
{ | ||
"type": "vagrant", | ||
"output": "build/vb.box" | ||
} | ||
] | ||
} |