Installing Openshift Origin natively on an AWS Lightsail VM powered by Ubuntu 16.04


  • Setup a LightSail VM with at least 4Gb of RAM.
  • Go to the Networking tab, and set all ports to open in the Firewall section on AWS
  • Get the latest Openshift release from their Github
  • Extract everything to an openshift folder.

tar -xvzf openshift openshift-origin-server*

  • Move all binaries from the openshift folder to /usr/bin

rm -rf openshift*/
rm -rf openshift*/LICENSE
mv openshift*/* /usr/bin

  • Generate the master node’s configuration
  • Assign a static IP to your Lightsail instance from the AWS Lightsail’s network tab.
  • Replace XXX.XXX.XXX.XXX with your static IP below

mkdir -p /var/lib/origin/
cd /var/lib/origin/
openshift start master \
--master="https://${EXTERNAL_IP}:8443" \
--dns="" \
sed -i "s/router.default.svc.cluster.local/${EXTERNAL_IP}" \

  • Setup Hostname

export OPENSHIFT_HOSTNAMES=kubernetes.default.svc.cluster.local,localhost,openshift.default.svc.cluster.local,,,,,,,,$HOSTNAME,$EXTERNAL_IP
oc adm create-node-config \
--dns-ip='' \
--node-dir=/var/lib/origin/openshift.local.config/node-localhost \
--node=localhost --hostnames=$OPENSHIFT_HOSTNAMES

  • Start up the cluster

oc cluster up --use-existing-config --public-hostname="${EXTERNAL_IP}"

  • Update password on the developer account

htpasswd -c /var/lib/origin/openshift.local.config/master/users.htpasswd developer

  • Replace the existing identityProviders section in the file /var/lib/origin/openshift.local.config/master/master-config.yaml with the following

- name: my_htpasswd_provider
challenge: true
login: true
mappingMethod: add
apiVersion: v1
kind: HTPasswdPasswordIdentityProvider
file: /var/lib/origin/openshift.local.config/master/users.htpasswd

  • Saving the start cluster command for easier access or to run at Start ups. Replace XXX.XXX.XXX.XXX with your IP.

/usr/bin/oc cluster up --use-existing-config --public-hostname="XXX.XXX.XXX.XXX" --host-data-dir=/etcd

Inspired from :

Written by on August 3, 2018

More from the blog

GateSentry updates

Found some free time this weekend, decided to put it to use with some long needed updates to Read More

GateSentry Raspberry Pi : Updating the expired certificate

If you're using GateSentry's Raspberry Pi image, you might be seeing some certificate expiry Read More

Building a simple serverless CRUD app powered by Lambda and DynamoDB

Amazon web services has a very comprehensive set of documentation when it comes to cloud Read More