-
Notifications
You must be signed in to change notification settings - Fork 46
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
GCP image generation #519
base: devel
Are you sure you want to change the base?
GCP image generation #519
Conversation
Skipping CI for Draft Pull Request. |
65ab1f5
to
be748fd
Compare
Those scripts are needed the same way we do with azure and aws. Signed-off-by: Beraldo Leal <[email protected]>
This is not installing when running the docker locally. Propably I will drop this commit. Signed-off-by: Beraldo Leal <[email protected]>
Those methods will be duplicated again with GCP, lets centralize them inside lib.sh. Signed-off-by: Beraldo Leal <[email protected]>
This is temporary, podman-docker doesn't have docker buildx ... Signed-off-by: Beraldo Leal <[email protected]>
Signed-off-by: Beraldo Leal <[email protected]>
be748fd
to
291683f
Compare
|
||
# TODO: This means we are installing the azure rpms for all providers? |
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.
no, by following it you'll see it's actually installing general set of binaries, i'm not sure it's implemented like, it may need a fix
# Ensure CLOUD_PROVIDER is set to gcp | ||
[[ -z "${CLOUD_PROVIDER}" || "${CLOUD_PROVIDER}" != "gcp" ]] && error_exit "CLOUD_PROVIDER is empty or not set to gcp" | ||
|
||
[[ -z "${AWS_ACCESS_KEY_ID}" ]] && error_exit "AWS_ACCESS_KEY_ID is not set" |
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.
remove all the aws related vars
|
||
# Download gcloud cli | ||
# TODO | ||
tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM |
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.
indent left?
tar -cvzf build/disk.tar.gz -C build disk.raw | ||
|
||
# Create bucket if doesn't exist | ||
export GCP_REGION="us-central1" |
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.
Is this the only region supported or bucket is available in all regions?
echo "${GCP_IMAGE_NAME} created successfully" | ||
} | ||
|
||
# Function to create or update podvm-images configmap with all the amis |
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.
To be removed i suppose..
# Create bucket if doesn't exist | ||
export GCP_REGION="us-central1" | ||
export GCP_BUCKET_NAME="peerpods-bucket" | ||
if ! gsutil ls -b "gs://${GCP_BUCKET_NAME}/" &>/dev/null; then |
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.
I'd encapsulate the uploading part and image creation part to different function as it may be useful to the uploading disk images that comes from other sources (bootc, user's image etc..)
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.
Thanks for working on this!, I added a few comments
- Description of the problem which is fixed/What is the use case
In order to support GCP with the next release, we need to generate the images automatically in case image is not configured by the user.
- What I did
I followed the same approach used by aws and azure. This is a WiP.
- How to verify it
WiP
- Description for the changelog
Added support for a new cloud provider: Google Cloud Platform (GCP).