-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add our VM baseline to amphora images #31
Changes from all commits
6565615
045e9e5
1ef3c38
64a48e5
33bea99
495ac22
f5ed6a6
06b9aad
8d158a4
48c1b49
311beb7
756927d
af6d889
cfa9379
0f03efe
6b519e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-installs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
DavidFair marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
set -euo pipefail | ||
|
||
#install ansible | ||
/usr/bin/python3 -m venv /tmp/amphora-venv | ||
source /tmp/amphora-venv/bin/activate | ||
/usr/bin/python3 -m pip install ansible | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we use a venv, just because this will break in 22.04 onwards and it's bad to potentially trash the system packages anyway:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, done |
||
/usr/bin/git clone https://github.com/stfc/cloud-image-builders.git | ||
cd cloud-image-builders | ||
|
||
locale-gen en_GB.UTF-8 | ||
dpkg-reconfigure locales | ||
update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8 | ||
source /etc/default/locale | ||
locale | ||
|
||
apt-get install gpg-agent -y | ||
/usr/bin/gpg-agent --daemon | ||
|
||
hostname | ||
sed -i "s/hosts: default/hosts: localhost/g" os_builders/*.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I feel like there's something we can tweak in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, default includes localhost so it should work but doesnt |
||
echo "{\"groups\": [\"default\", \"cloud\", \"ubuntu\", \"debian\", \"octavia-amphora\"], \"labels\": {\"amphora-build-date\": \"$(date '+%Y-%m-%d %H:%M:%S')\" }}" > /var/ossec/etc/extra/03-amphora.json | ||
ansible-playbook os_builders/prepare_user_image.yml --extra-vars provision_this_machine=true -i os_builders/inventory/localhost.yml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
python3-pip: | ||
installtype: package | ||
git: | ||
installtype: package | ||
gpg-agent: | ||
installtype: package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shellcheck required in the future - nothing critical/blocking at the moment