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

Add our VM baseline to amphora images #31

Merged
merged 16 commits into from
Oct 9, 2024
Merged

Conversation

apdibbo
Copy link
Collaborator

@apdibbo apdibbo commented Sep 23, 2024

Add our VM baseline to amphora images

Depends on #27

Fix permissions

Set permissions after pull

Fix line endings

Add dependencies

add full paths

Move to later in the load order

Set locale so ansible can run

Different way of setting locale

Output list of locales

A different way of setting the locale

print hostname

Update playbooks to localhost before running

Add gpg-agent for managing gpg keys

Start GPG agent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have this procedure in confluence as well if it isn't already

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidFair to confirm?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm happy to move it - but I'd want a single copy either in the readme or confluence so they don't become out of sync

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A link to the readme from confluence with enough metadata to be searchable should be good

@@ -0,0 +1,19 @@
#!/bin/bash
#install ansible
/usr/bin/python3 -m pip install ansible
Copy link
Collaborator

Choose a reason for hiding this comment

The 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:

python3 -m venv /tmp/amphora-venv
source /tmp/amphora-venv/bin/activate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, done

/usr/bin/gpg-agent --daemon

hostname
sed -i "s/hosts: default/hosts: localhost/g" os_builders/*.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I feel like there's something we can tweak in the os_builders dir to make this easier rather than using sed, but I'm drawing a blank currently...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, default includes localhost so it should work but doesnt

amphora-image-builder/entrypoint.sh Outdated Show resolved Hide resolved
Copy link
Contributor

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

@apdibbo
Copy link
Collaborator Author

apdibbo commented Oct 8, 2024

I've addressed David's comments but it will now fail to build the amphora in the tests due to requiring the content of this PR to be merged.

@DavidFair
Copy link
Collaborator

@jacob-ward if you're happy with the changes after feel free to merge as the second reviewer

@apdibbo apdibbo merged commit 3637067 into stfc:main Oct 9, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants