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

Updating Openstack variables in Travis + Updating some deprecated features #57

Merged
merged 1 commit into from
Dec 7, 2018

Conversation

carmat88
Copy link
Member

@carmat88 carmat88 commented Dec 5, 2018

Hello @andersla! As per our discussion, regularly tech companies do releases updates and various; hence a couple of things needed to be revised. Namely:

  • Openstack global variables in Travis (i.e. CityCloud RC fields)
  • Some python related glitches and packages versions
  • Azure new GPG key for the apt package
  • Terraform builder file for OS
  • Removed unnecessary leftovers variables

Also please see files changed for further comments.

@carmat88
Copy link
Member Author

carmat88 commented Dec 5, 2018

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.

@carmat88 carmat88 force-pushed the fix/os_terraform_deprecated branch 9 times, most recently from 1e58e83 to 7842d56 Compare December 7, 2018 13:43
- "2.7"

virtualenv:
system_site_packages: true
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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 {}
Copy link
Member Author

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}"
}

Copy link
Member Author

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"
}
Copy link
Member Author

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"
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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.

@carmat88
Copy link
Member Author

carmat88 commented Dec 7, 2018

Hej @andersla . As per our discussion, it's all good now! As decided together, I will merge first this PR and release a new stable 0.6. Then I'll merge #58 and issue a pre-release 0.7a1. Cheers!

@carmat88 carmat88 merged commit 8699835 into master Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant