-
Notifications
You must be signed in to change notification settings - Fork 5
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
Updating Openstack variables in Travis + Updating some deprecated features #57
Conversation
13c6c32
to
77ecb9a
Compare
Hej @andersla . Please ignore that checks are all green at the moment. Something is still wrong with terraform. Will ping you once is running successfully. |
1e58e83
to
7842d56
Compare
7842d56
to
2336ebb
Compare
- "2.7" | ||
|
||
virtualenv: | ||
system_site_packages: true |
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.
In order to pinpoint a particular version of python and all related tools (e.g. pip, python-openstack, etc...)
@@ -8,7 +14,7 @@ services: | |||
|
|||
env: | |||
global: | |||
- TERRAFORM_VERSION=0.9.4 | |||
- TERRAFORM_VERSION=0.11.10 |
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.
Upgrading to latest terraform version given deprecated features in previous one.
- > | ||
sudo apt-key --keyring /etc/apt/trusted.gpg.d/Microsoft.gpg adv \ | ||
--keyserver packages.microsoft.com --recv-keys BC528686B50D79E339D3721CEB3E94ADBE1229CF | ||
- sudo apt-get update && sudo apt-get install azure-cli |
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.
Updating Azure GPG key for apt.
variable username {} | ||
variable password {} | ||
variable domain_name {} | ||
variable tenant_name {} |
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.
Our Openstack provider has made some changes to the RC file, therefore less variables are now needed to instantiate VM with both terraform
and packer
.
floating_ip = "${openstack_networking_floatingip_v2.fip_1.address}" | ||
instance_id = "${openstack_compute_instance_v2.kubenow-image-export.id}" | ||
} | ||
|
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.
New terraform
resource for associating a floating ip to an instance.
private_key = "${file(var.ssh_key_prv)}" | ||
agent = "false" | ||
timeout = "3m" | ||
} |
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.
Currently this seems to be a workaround given the issue we've filed with the Terraform's folks: hashicorp/terraform#19565. So we are provisioning the necessary files via an "upload-and-execute-file
" resource.
@@ -3,52 +3,53 @@ | |||
|
|||
# Installing needed tools | |||
# NB: this bash script run in travis where sudo is required. Thus we must put sudo before the usual pip command | |||
sudo pip install python-openstackclient==3.11.0 | |||
sudo -H pip install cryptography=="2.2.2" | |||
sudo -H pip install python-openstackclient=="3.17.0" |
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.
Making sure to install precise python tools. This could change in the future.
network_id=$(openstack network list | grep -i "default" | awk '{print $2}') | ||
echo -e "Default Network ID: $network_id" | ||
export TF_VAR_network_id=$network_id |
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.
Refactoring all terraform variables given the new rc file from our Openstack provider.
@@ -58,7 +59,7 @@ export AWS_BUCKET2_URL=$AWS_BUCKET2_URL | |||
" >>/tmp/aws_and_os.sh | |||
|
|||
# Launching OS instance with terraform | |||
/tmp/terraform apply | |||
/tmp/terraform init && /tmp/terraform apply -auto-approve |
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.
terraform init
is required now. Same with passing the flag -auto-approve
.
Hello @andersla! As per our discussion, regularly tech companies do releases updates and various; hence a couple of things needed to be revised. Namely:
Also please see files changed for further comments.