Giter Club home page Giter Club logo

openshift4-ansible's Introduction

openshift4-ansible

This playbook creates the OpenShift 4 UPI (User provided Infrastructure) on AWS into an existing VPC with existing private and public subnets and DNS Zones.

It is also possible to deploy the API server without exposing it to the Internet, this will require that the host that runs this Ansible playbook can access the VPC subnets.

The Cloudformation templates are based on these: https://github.com/openshift/installer/tree/master/upi/aws/cloudformation

Some information has to be provided. Mainly information about your AWS VPC, your subnets etc. See inventory/group_vars/all

Setup

Create an administrative IAM user to perform the install. See https://github.com/openshift/installer/blob/master/docs/user/aws/iam.md

This user can be removed after the installation

To set up a bastion host follow these steps:

Start with a RHEL7 Instance.

Become root and install the needed tools:

sudo -i

subscription-manager repos --enable rhel-7-server-ansible-2.8-rpms

yum install -y ansible

yum install -y \
  https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

yum -y install \
  python2-boto python2-boto3 python2-simplejson

yum erase -y epel-release

exit

With your own account, create ~/.aws/credentials with the following content, replacing the AWSKEY and AWSSECRETKEY with the right values from AWS.

[default]
aws_access_key_id = AWSKEY
aws_secret_access_key = AWSSECRETKEY

Usage

Modify inventory/group_vars/all.

ansible-playbook install-upi.yaml

To delete all AWS resources that were created for an OpenShift cluster, use the same inventory/group_vars/all that was used for the installation. In particular, the clustername has to match. You also need the /tmp/CLUSTERNAME directory that was created by the installation playbook.

ansible-playbook uninstall-upi.yaml

Disk Encryption

To enable encryption of the EBS volumes attached to the master and worker nodes, the RHCOS AMI needs to be copied before the installation is started. This can be done by running

ansible-playbook create-encrypted-ami.yaml

The playbook uses the AMI ID rhcos_ami from vars.yaml as the source and creates a private AMI that is identical to the source AMI, except that disk encryption is enabled.

install-upi.yaml looks for a private AMI created by create-encrypted-ami.yaml. If none is found, it uses AMI ID rhcos_ami from inventory/group_vars/all.

openshift4-ansible's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openshift4-ansible's Issues

Failed To deploy the control plane.

Hi,
I tried to deploy an infrastructure using your playbook (on one zone). I got this issue:

fatal: [localhost]: FAILED! => {
    "msg": "The task includes an option with an undefined variable. The error was: list object has no element 1\n\nThe error appears to be in '/home/deployer/openshift4-ansible/install-upi.yaml': line 193, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Create UPI Node Launch (EC2 master instances)\n      ^ here\n"
}

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.