Skip to content

0.7 Openstack Platform Deployment

Tomasz Pawelczak edited this page Jun 24, 2016 · 30 revisions

Prerequisites

TAP recommends using Mirantis Openstack 7.0 for deployments.

Note: TAP install requires Internet connectivity

Hardware recommendations:

  • 1x Controller node: 2 CPUs with 6 cores, 24 GB of RAM, 1 TB RAID1
  • 1x Storage node: 1 CPU with 4 physical cores, 12 GB of RAM, 3 TB of ceph storage, 500 GB RAID1
  • 1x fuel server: Quad-core CPU, 4 GB RAM, 1 Gbps Ethernet, 128 GB SAS Disk, IPMI access through independent management network.
  • 6x compute node (each): Dual-socket CPU with at least 4 physical cores per socket, 64 GB RAM, 256 SSD

For VLAN networking 2 NICs are recommended, when using VXLAN only 5 are recommended.

Additional prerequisites for Hybrid deployments can be found here: 0.7 Openstack Hybrid Prerequisites

Configuration recommendations:

  • X-Auth-Token should be valid for 24h
    • Login to controller node as root
    • Edit  /etc/keystone/keystone.conf
    • Find section [token]
    • Change expiration = 3600 to expiration = 86400
    • Restart apache2 service (if your controller runs on Ubuntu) or httpd service (if your controller runs on CentOS)
  • Nova should use lvm type storage for VM. (Nova configuration.)

Create a Stack

  1. Download heat template for stack. Use TAP-FullVM.yaml for Full VM type install, or TAP-Hybrid.yaml for Hybrid type install.

  2. Log into OpenStack Horizon WebUI as admin.

  3. Create a new OpenStack project (Identity -> Projects -> Create Project), set quotas for Volumes, Vol Snapshots, Total size of Vols and Security Groups to "-1".

  4. Create a new OpenStack user (Identity -> Users -> Create User), grant admin rights to the project just created.

  5. Logout from Horizon and log in with just created user identity.

  6. Switch the UI context to the project just created (Top bar drop-down menu).

  7. Import a SSH key pair (Project -> Compute -> Access & Security -> Key Pairs -> Import Key Pair).

  8. Allocate and note down a Floating IP (Project -> Compute -> Access & Security -> Floating IPs -> Allocate IP To Project). Use it to register DNS A wildcard record of a TAP Domain.

  9. Note down API URL (Project -> Compute -> Access & Security -> Api Access -> Identity).

  10. Launch a Stack (Project -> Orchestration -> Stacks -> Launch Stack).

  11. Provide a template file as Template Source.

  12. Increase timeout to 300 minutes.

  13. Set OpenStack identity API URL to noted down API URL.

  14. Set Public IP to a noted down Floating IP

    If you're behind a http proxy, and your Floating IP is accessed directly, put previously registered TAP Domain into No Proxy list - also if your OpenStack Horizon address is accessed directly, put Horizon IP (as in API URL) into No Proxy list

Deploy the platform

  1. When the stack is created - log in to a Jump Box instance using SSH with the key you've chosen: ssh ubuntu@<jumpbox_server_ip> -i <ssh_key.pem>
  2. Run a shell script to finish the installation:
    1. with Kerberos disabled:

      curl  https://s3.amazonaws.com/trustedanalytics/tqd.sh  | sudo -i bash

    2. with Kerberos enabled:

      curl  https://s3.amazonaws.com/trustedanalytics/tqd.sh  | sudo -i KERBEROS_ENABLED=True bash

The whole deployment process should take from 2 to 5 hours. Once the process is complete (the script finishes without writing about failure), you can access the TAP console via https://console.DOMAIN_NAME_YOU_CHOSE and login with the username admin and the password you can find accessing Horizon UI for your OpenStack project (Project -> Orchestration -> Stacks -> (choose stack) -> Overview -> Outputs/password).

To access individual VMs, please SSH into the Jump Box machine using the procedure from the "Accessing installation logs" section below.

Troubleshooting

Accessing OpenStack installation logs

  1. Go to the Openstack Horizon UI Stacks tab (Project -> Orchestration -> Stacks -> (choose stack) -> Overview) and get the Jump box IP address: image
  2.     SSH to the instance using the user ubuntu and the key provided during the installation.
  3.     Search /var/log/ansible.log for failed steps.

Accessing CDH manager

  1. Log in to a Jump Box instance using SSH with port forwarding set up to the cdh-master-2 machine: ssh ubuntu@<jumpbox_server_ip> -i <ssh_key.pem> -L 7180:cdh-master-2:7180
  2. You should be able to access the CDH Manager web UI via http://localhost:7180

Removing an OpenStack environment

  1. Login to jumpbox and switch to root account

    ssh ubuntu@<jumpbox_server_ip> -i <ssh_key.pem>

    sudo -i

  2. Clear extra routes in OS router

    router_id=$(awk -F = '/router_id/ { print $2 }' /etc/ansible/hosts)

    neutron --insecure --os-cloud TAP router-update ${router_id} --routes action=clear

  3. Delete docker-broker deployment

    bosh delete deployment docker-broker

  4. Delete cf deployment

    bosh delete deployment cf

    ℹ️ Information
    This task can take a long time, repeat in case of failure.
  5. Delete BOSH director

    cd /root/<deployment-name>-bosh/

    bosh-init delete bosh.yml

  6. Login to Horizon UI

    1. Go to Stacks list (go to: Project -> Orchestration -> Stacks)
    2. Delete your Stack (select it, and click red button in upper right corner)
    3. After Stack delete clean up volume leftovers if any  (Project -> Compute -> Volume)
    4. Remove BOSH Stemcells (Project -> Compute -> Images) and delete all images with name starting with BOSH
  7. Optional (skip this step if in doubt)

    1. Release Floating IP (Project -> Compute -> Access & Security -> Floating IPs)
    2. Delete your SSH key pair (Project -> Compute -> Access & Security -> Floating IPs)
Clone this wiki locally