Skip to content

Single click installation of RedHat OpenShift with Contrail SDN (on AWS)

vinarao edited this page Aug 13, 2018 · 26 revisions

Red Hat OpenShift Origin with Contrail SDN

This tutorial walks you through the installation of Red Hat OpenShift container orchestration platform with Contrail SDN as the CNI on Amazon Web Services (AWS).

It leverages AWS's CloudFormation to launch the stack & takes approximately 30 min for the total installation to complete. The stack builds

  • Red Hat OpenShift Origin v3.9
  • Contrail Networking CNI 5.1

Prerequisites

  • Create an AWS account if you don't have one. Else Login

  • Subscribe to CentOS AMI on AWS marketplace

  • Create a GitHub account if you don't have one. Else Login

Installation

  • Click on the button below to launch the stack in AWS

    Launch Stack

  • Once you click on the button, you will be navigated to AWS CloudFormation page. Enter the parameters

    launch-stack

    NOTE: You can leave most of the parameters set to default

     InstanceType:
       Description: EC2 instance type
       Default: t2.xlarge
    
     VpcCIDR:
       Description: CIDR block for the VPC
       Default: 10.10.0.0/16
    
     SubnetCIDR:
       Description: CIDR block for the VPC subnet
       Default: 10.10.10.0/24
    
     MasterIPv4Address:
       Description: Master instance's IPv4 Address
       Default: 10.10.10.10
    
     MinionIPv4Address:
       Description: Minion instance's IPv4 Address
       Default: 10.10.10.11
    
     SSHLocation:
       Description: Allow access to EC2 instances from
       Default: 0.0.0.0/0
    
     InstancePassword:
       Description: Password for the instances
    
     ContrailBuild:
       Description: Contrail build information
       Default: 5.0
    
     ContrailRegistry:
       Description: Registry to pull Contrail containers
       Default: hub.juniper.net/contrail
    
     ContrailRegistryUsername:
       Description: Registry username
    
     ContrailRegistryPassword:
       Description: Registry password
    
  • Wait for the stack to complete. You can monitor the resource creation by clicking on the Events tab

    monitor-stack

  • Once complete, navigate to the Outputs tab & copy the ShellURL value. Login to the instance using the ShellURL & the password you set

    complete-stack

  • Run the script from the master instance's /root directory

     (local-instance)# ssh root@ec2-<public-ip>.us-west-1.compute.amazonaws.com
    
     (master-instance)# cd /root
     (master-instance)# ~/run.sh
    

    run-stack

  • Once install is complete, login to the dashboards (WebUI) of both OpenShift & Contrail. The URL's are listed in the Outputs tab of AWS CloudFormation

    openshift-webui

    contrail-webui

  • Verify all Contrail pods are running healthy, by logging into OpenShift & Contrail dashboards

    OpenShift Dashboard > My Projects > kube-system > Applications > Pods

    contrail-pods

    Contrail Dashboard > Monitor > Infrastructure > Dashboard

    contrail-status

  • Enable SNAT on the pod network, by logging into Contrail dashboard

    Contrail Dashboard > Configure > Networking > Networks > default-domain > default> k8s-default-pod-network (edit)

    enable-snat

  • Try the below labs

    1. LAB-1: Build/test/deploy highly scalable apps using OpenShift & Contrail SDN
  • Try the below Homework at leisure:

    1. HW-1: Expose highly scalable apps using OpenShift & Contrail SDN
    2. HW-2: Secure highly scalable apps using OpenShift & Contrail SDN