Install Yorc and requirements

This section describes how to install Yorc manually. Different ways of installing Yorc are described in other sections:

Typical Yorc deployment for OpenStack

In order to provision softwares on virtual machines that do not necessary have a floating IP we recommend to install Yorc itself on a virtual machine in your OpenStack tenant. Alien4Cloud and the Alien4Cloud Yorc Plugin (see their dedicated documentation to know how to install them) may be collocated on the same VM or resides in a different VM.

Virtual Machines created by Yorc should be connected to the same private network as the Yorc VM (the –infrastructure_openstack_private_network_name configuration flag allows to do it automatically). In order to provision Floating IPs, this private network should be connected to the public network of the tenant through a router.

Typical Yorc deployment for OpenStack

Host requirements

Yorc requires a Linux x86_64 system to operate with at least 2 CPU and 2 Go of RAM.

Packages installation

Following packages are required to perform the installation:
  • python
  • python-pip
  • zip/unzip
  • openssh-client
  • wget

Now you can proceed with the installation of softwares used by Yorc.

sudo pip install ansible==2.7.2
wget https://releases.hashicorp.com/consul/1.2.3/consul_1.2.3_linux_amd64.zip
sudo unzip consul_1.2.3_linux_amd64.zip -d /usr/local/bin
wget https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip
sudo unzip terraform_0.11.8_linux_amd64.zip -d /usr/local/bin

As Terraform uses plugins for required providers, you can pre-installed them in a directory you specify with the Yorc Server configuration option (–terraform_plugins_dir). Here are the command lines for installing all providers in /var/terraform/plugins. See https://www.terraform.io/guides/running-terraform-in-automation.html#pre-installed-plugins for more information.

sudo mkdir -p /var/terraform/plugins

wget https://releases.hashicorp.com/terraform-provider-consul/2.1.0/terraform-provider-consul_2.1.0_linux_amd64.zip
sudo unzip terraform-provider-consul_2.1.0_linux_amd64.zip -d /var/terraform/plugins

wget https://releases.hashicorp.com/terraform-provider-null/1.0.0/terraform-provider-null_1.0.0_linux_amd64.zip
sudo unzip terraform-provider-null_1.0.0_linux_amd64.zip -d /var/terraform/plugins

wget https://releases.hashicorp.com/terraform-provider-aws/1.36.0/terraform-provider-aws_1.36.0_linux_amd64.zip
sudo unzip terraform-provider-aws_1.36.0_linux_amd64.zip -d /var/terraform/plugins

wget https://releases.hashicorp.com/terraform-provider-google/1.18.0/terraform-provider-google_1.18.0_linux_amd64.zip
sudo unzip terraform-provider-google_1.18.0_linux_amd64.zip -d /var/terraform/plugins

wget https://releases.hashicorp.com/terraform-provider-openstack/1.9.0/terraform-provider-openstack_1.9.0_linux_amd64.zip
sudo unzip terraform-provider-openstack_1.9.0_linux_amd64.zip -d /var/terraform/plugins

sudo chmod 775 /var/terraform/plugins/*

Finally you can install the Yorc binary into /usr/local/bin.

To support Orchestrator-hosted operations sandboxed into Docker containers the following softwares should also be installed.

# for apt based distributions
sudo apt install Docker
# for yum based distributions
sudo yum install Docker
# Docker should be running and configured to works with http proxies if any
sudo systemctl enable docker
sudo systemctl start docker

sudo pip install docker-py

For a complete Ansible experience please install the following python libs:

# To support json_query filter for jinja2
sudo pip install jmespath
# To works easily with CIDRs
sudo pip install netaddr

To support Ansible SSH password authentication instead of common ssh keys, the sshpass helper program needs to be installed too.

# for apt based distributions
sudo apt install sshpass
# for yum based distributions
sudo yum install sshpass

Final setup

In order to provision softwares through ssh, you need to store the ssh private key that will be used to connect to the nodes under $HOME/.ssh/yorc.pem where $HOME is the home directory of the user running Yorc. This key should part of the authorized keys on remote hosts. Generally, for OpenStack, it corresponds to the private key of the keypair used to create the instance.

Note

A common issue is to create a key file that does not comply the ssh requirements for private keys (should be readable by the user but not accessible by group/others read/write/execute).