Skip to content

Instantly share code, notes, and snippets.

@dougbtv
Created September 5, 2017 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dougbtv/340c0d1164163d1fa7bcb1a30ef616e4 to your computer and use it in GitHub Desktop.
Save dougbtv/340c0d1164163d1fa7bcb1a30ef616e4 to your computer and use it in GitHub Desktop.
OpenShift AIO cheat sheet
# Set ip_forward to 1
/sbin/sysctl -w net.ipv4.ip_forward=1
# Install docker (plus a handy wget)
yum install -y docker wget
# Setup docker to allow an "insecure" registry.
sed -i -e "s|\# INSECURE_REGISTRY='--insecure-registry'|INSECURE_REGISTRY='--insecure-registry 172.30.0.0/16'|" /etc/sysconfig/docker
# Start and enable docker.
systemctl daemon-reload
systemctl start docker
systemctl enable docker
# Download the oc command line tool.
wget https://github.com/openshift/origin/releases/download/v3.6.0-rc.0/openshift-origin-client-tools-v3.6.0-rc.0-98b3d56-linux-64bit.tar.gz
tar -xzvf openshift-origin-client-tools-v3.6.0-rc.0-98b3d56-linux-64bit.tar.gz
cp openshift-origin-client-tools-v3.6.0-rc.0-98b3d56-linux-64bit/oc /usr/bin/
chmod +x /usr/bin/oc
# Check that it's in your path.
oc version
# Bring up the cluster.
oc cluster up
# See that you can get pods (likely nothing there yet)
oc get pods
# Login as admin.
oc login -u system:admin
# Check the cluster (err, AIO) status.
oc status
@dougbtv
Copy link
Author

dougbtv commented Feb 14, 2018

From Frank:

<fzdarsky> dougbtv, FYI, had to add those FW rules, otherwise pods wouldn't start.
<fzdarsky> Also, the 'sed' command no longer works. Needs echo '{"insecure-registries": ["172.30.0.0/16"] }' > /etc/docker/daemon.json instead.

Firewall rules in this document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment