All Projects → carlosedp → openshift-on-footloose

carlosedp / openshift-on-footloose

Licence: other
Running Openshift on Footloose, docker in docker

Projects that are alternatives of or similar to openshift-on-footloose

okd4-upi-lab-setup
Building an OKD 4 Home Lab
Stars: ✭ 72 (+166.67%)
Mutual labels:  openshift, lab
Openshiftv3 Workshop
OpenShift v3 Workshops by the OpenShift Tiger Team
Stars: ✭ 179 (+562.96%)
Mutual labels:  openshift, lab
Openshiftv3 Ops Workshop
Workshop Materials for Operations
Stars: ✭ 60 (+122.22%)
Mutual labels:  openshift, lab
libvirt-ocp4-provisioner
Automate your OCP4 installation
Stars: ✭ 82 (+203.7%)
Mutual labels:  openshift
spring-boot-configmaps-demo
Demo application to show Spring Boot configuration using ConfigMaps
Stars: ✭ 31 (+14.81%)
Mutual labels:  openshift
welcome
a virtual hackerspace for open-source contributors 🍿☕
Stars: ✭ 41 (+51.85%)
Mutual labels:  lab
amqv7-workshop
No description or website provided.
Stars: ✭ 22 (-18.52%)
Mutual labels:  lab
openshift-prometheus
Repository for all things related to Prometheus on OpenShift
Stars: ✭ 53 (+96.3%)
Mutual labels:  openshift
cytoscape-sbgn-stylesheet
View biological networks via Cytoscape.js and sbgn-ml
Stars: ✭ 47 (+74.07%)
Mutual labels:  lab
kubernetes-lab
Kubernetes - Basics to Advanced
Stars: ✭ 44 (+62.96%)
Mutual labels:  openshift
mongodb-container
MongoDB container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Stars: ✭ 50 (+85.19%)
Mutual labels:  openshift
openshift101
OpenShift 101 on IBM Cloud tutorial: https://ibm.github.io/openshift101/
Stars: ✭ 27 (+0%)
Mutual labels:  openshift
BigComputeLabs
Big Compute Learning Labs
Stars: ✭ 19 (-29.63%)
Mutual labels:  lab
scale-ci-deploy
Automation for OpenShift Deployments - install, scaling and upgrades
Stars: ✭ 14 (-48.15%)
Mutual labels:  openshift
OpenShift
Azure Red Hat OpenShift
Stars: ✭ 92 (+240.74%)
Mutual labels:  openshift
summit-game-ansible
Playbook for provisioning the Red Hat Summit 2016 Balloon Game Demo
Stars: ✭ 13 (-51.85%)
Mutual labels:  openshift
prologix-gpib-ethernet
Simple wrapper for the Prologix GPIB-to-Ethernet adapter.
Stars: ✭ 20 (-25.93%)
Mutual labels:  lab
openshift-sync-plugin
Synchronizes OpenShift BuildConfig objects as Jenkins jobs and synchronizes job status into OpenShift Build objects
Stars: ✭ 16 (-40.74%)
Mutual labels:  openshift
kraken
Chaos and resiliency testing tool for Kubernetes and OpenShift
Stars: ✭ 161 (+496.3%)
Mutual labels:  openshift
sarjitsu
dockerized setup for visualizing System Activity Report (SAR) data.
Stars: ✭ 20 (-25.93%)
Mutual labels:  openshift

Running Openshift on Footloose

This project allows one to deploy OpenShift inside a Docker container, also known as DinD or Docker in Docker. This was inspired by Alex Ellis post describing the steps to deploy OpenShift and install OpenFaaS.

The deployment is done using Footloose, a project from Weaveworks that aims to be Containers that look like Virtual Machines and is done completely by an Ansible playbook. You can deploy and use most features from Openshift like using the catalog, deploying Source2Image applications and more.

There is also a convenience playbook to install OpenFaaS on the newly deployed OpenShift.

Requirements

Mac

# Install Homebrew package manager (if you don't have it yet)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install Docker
brew cask install docker
# Start Docker
open /Applications/Docker.app

# Install Footloose, Ansible and Openshift/Kubernetes CLI
brew tap hudochenkov/sshpass # Required by Ansible to connect using SSH with passwords
brew install ansible sshpass kubernetes-cli openshift-cli
brew tap weaveworks/tap
brew install weaveworks/tap/footloose

Linux

# Install Docker
curl -fsSL https://get.docker.com/ | sh

# Install Ansible
sudo dnf install ansible # or
sudo yum install ansible # or
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
sudo apt-get update
sudo apt-get install ansible

# Install Footloose
curl -Lo footloose https://github.com/weaveworks/footloose/releases/download/0.4.0/footloose-0.4.0-linux-x86_64
chmod +x footloose
sudo mv footloose /usr/local/bin/

Running

To deploy a container machine, install the pre-reqs and start OpenShift, do:

ansible-playbook main.yml

You can also deploy the monitoring stack based on CoreOs cluster-monitoring-operator into the the cluster. Just do:

ansible-playbook monitoring-operator.yml

To deploy OpenFaas into the cluster, run:

ansible-playbook openfaas.yml

Openshift console will be available on https://127.0.0.1.nip.io:8443/console and OpenFaas on https://openfaas.127.0.0.1.nip.io.

Log-in with user admin / any password to access cluster as cluster-admin or user developer / any password.

In the command line, the cluster configuration file will be available on your local directory. You can use OpenShift oc or Kubernetes kubectl to access the cluster just do:

mkdir -p $HOME/.kube
cp openshift-config $HOME/.kube/config

oc login -u system:admin
oc get nodes
oc get pods --all-namespaces
#or
kubectl get nodes
kubectl get pods --all-namespaces

You can deploy any application from the catalog and create routes that will be exposed using nip.io to avoid fiddling with /etc/hosts.

To stop the Openshift, just use footloose stop. To restart, you can either do footloose start && footloose ssh root@node0 /root/oc-up.sh or re-run the main.yml playbook.

OpenFaaS Demo

# Install openfaas cli from https://github.com/openfaas/faas-cli
export OPENFAAS_URL=https://openfaas.127.0.0.1.nip.io
faas-cli store deploy --tls-no-verify certinfo
echo -n www.openfaas.com | faas-cli invoke --tls-no-verify certinfo

Example App - Source2Image

oc new-project nodejs-echo \
    --display-name="nodejs" --description="Sample Node.js app"
oc project nodejs-echo
oc new-app https://github.com/sclorg/nodejs-ex -l name=myapp

oc status
oc logs -f bc/nodejs-ex

oc expose svc/nodejs-ex --hostname=nodejs-ex.127.0.0.1.nip.io

Remove the container and data

ansible-playbook teardown.yml
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].