-
Notifications
You must be signed in to change notification settings - Fork 40
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
Azure alternative boot image and some other things (1) #383
Conversation
Allows for alternative boot image for Azure (not only KubeNow image) Fixes download status message in Azure image import script Changes KubeNow_ env prefix to KN_ Adds hcl2json (HashicorpConfigLanguage) to Dockerimage and changes reading of parameters in config file from sed with grep to hcl2json tool Adds private_ip variable to inventory
Allows for alternative boot image for Azure (not only KubeNow image) Fixes download status message in Azure image import script Changes KubeNow_ env prefix to KN_ Adds hcl2json (HashicorpConfigLanguage) to Dockerimage and changes reading of parameters in config file from sed with grep to hcl2json tool Adds private_ip variable to inventory
…now/KubeNow into feature/azure-alternative-bootimage
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.
Looks good, and it is much more neat with json2hcl! Could you use it for every image parsing? Apart from this I have some minor questions, just to keep up with your development.
@@ -28,19 +28,19 @@ if [ -z "${TF_VARS_FILE}" ]; then | |||
fi | |||
|
|||
# Get vars from tfvars-file | |||
arm_client_id=$(grep "client_id" "$TF_VARS_FILE" | | |||
arm_client_id=$(grep "^client_id" "$TF_VARS_FILE" | |
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.
Isn't it possible to parse with the json2hcl tool?
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 left it as it is because I wanted it to work without Docker image somehow, but I think I changed my mind as well. I will change it for images in a later pull request.
|
||
# Break when finished | ||
if [[ "$done_bytes" == "$total_bytes" ]]; then | ||
printf '\rDone copy image \n' | ||
printf '\rDone copy image \n' |
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.
Why so many spaces? Can't we have \n straight away?
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.
It has to overwrite the previous text "Image copy progress: 99% of xxx"
# Set variables from json-config | ||
host_cloud=$(jq -r '.provider' <<<"$kn_config") | ||
image_name=$(jq -r '.boot_image' <<<"$kn_config") | ||
skip_image_import=$(jq -r '.skip_image_import' <<<"$kn_config") |
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.
Where do you set this var?
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.
Maybe this should be in the docs as well.
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.
Skip image import is not set yet, but it is used in a plugin config, where only Terraform part of KubeNow is used and a vanilla image is used.
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.
The other providers can use an alternative image just specifying the name (together with skip_image_import=true), Only Azure need alternative method in Terraform scripts.
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.
Also could you add some documentation on how/why using alternate Azure image? You can add a page in the advanced topics. Also, do we allow alternate images for the other providers?
Good! Then I think this PR is good to be merged, please add a little bit of documentation on "alternate azure image" and "skip image import" and we are ready to go! |
Change content and motivation
Allows for alternative boot image for Azure (not only KubeNow image)
Fixes download status message in Azure image import script
Changes KubeNow_ env prefix to KN_
Adds hcl2json (HashicorpConfigLanguage2json) to Dockerimage and changes reading of parameters in config file from sed with grep to hcl2json tool
Fixes #316
Fixes #327