Last active
March 3, 2019 18:01
-
-
Save mauricios/6132c68b4e09be7c1038d83857d4ab90 to your computer and use it in GitHub Desktop.
Install OpenShift in Amazon Linux 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure variables | |
OPENSHIFT_PACKAGE=https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | |
OPENSHIFT_HOSTNAME=openshift.xip.io | |
# Install Docker | |
sudo yum install docker -y | |
sudo usermod -aG docker ec2-user | |
# Add insecure registry to Docker | |
sudo sed -ie 's/OPTIONS="--default-ulimit nofile=1024:4096"/OPTIONS="--default-ulimit nofile=1024:4096 --insecure-registry 172.30.0.0\/16"/g' /etc/sysconfig/docker | |
# Add shared voulms to Docker | |
sudo mount --make-shared / | |
# Star Docker | |
sudo systemctl enable docker.service | |
sudo systemctl start docker.service | |
# Download OpenShift | |
wget $OPENSHIFT_PACKAGE -O openshift.tar.gz | |
# Untar OpenShift | |
sudo tar xzvf openshift.tar.gz --strip-components=1 -C /usr/bin/ */oc | |
# Deploy OpenShift cluster | |
oc cluster up —-routing-suffix=$OPENSHIFT_HOSTNAME —-public-hostname=$OPENSHIFT_HOSTNAME |
@mauricios you can replace line 11, with this:
sudo sed -ie 's/OPTIONS="--default-ulimit nofile=1024:4096"/OPTIONS="--default-ulimit nofile=1024:4096 --insecure-registry 172.30.0.0\/16"/g' /etc/sysconfig/docker
Please note the back slash for the segment 172.30.0.0/16, and i get rid of the back slashes in the white spaces for the input search string.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Due to a bug in OpenShift you need to create an SSH tunnel from your local machine to the OpenShift instance in order to access the web console, see: openshift/origin#19699 (comment)