Skip to content

Instantly share code, notes, and snippets.

View kmurudi's full-sized avatar

Kshitija Murudi kmurudi

View GitHub Profile
@kmurudi
kmurudi / docker-lab1.service
Last active June 28, 2017 19:54
systemd script plain
[Unit]
Description=Lab guide container
Requires=docker.service
After=docker.service
[Service]
TimeoutStartSec=0
Restart=on-failure
RestartSec=15
#EnvironmentFile=/etc/sysconfig/workshopper
@kmurudi
kmurudi / workshopper
Created June 28, 2017 15:44
contains the environment variables
WORKSHOPS_URLS="https://raw.githubusercontent.com/kmurudi/openshift-cns-testdrive/master/labguide/_cns_testdrive.yaml"
CONTENT_URL_PREFIX="https://raw.githubusercontent.com/kmurudi/openshift-cns-testdrive/master/labguide/"
[Unit]
Description=Lab guide container
After=docker.service
Requires=docker.service
[Service]
ExecStart=/opt/bin/systemd-docker run --name=workshopper3 -p 80:8080 --env-file /etc/sysconfig/workshopper docker.io/osevg/workshopper:0.1 env
Restart=always
RestartSec=10s
Type=notify
@kmurudi
kmurudi / config env file
Last active June 29, 2017 18:45
stored at - /etc/systemd/system/multi-user.target.wants/
WORKSHOPS_URLS="https://raw.githubusercontent.com/kmurudi/openshift-cns-testdrive/master/labguide/_cns_testdrive.yaml"
CONTENT_URL_PREFIX="https://raw.githubusercontent.com/kmurudi/openshift-cns-testdrive/master/labguide/"
@kmurudi
kmurudi / main.yml
Last active June 30, 2017 19:00
installing files at right location
---
# vim: set ft=ansible:
- name: Pulling the workshopper docker image
docker_image:
name: osevg/workshopper:0.1
- name: copy the systemctl script at the required location on the host

Installation and Verification

The method of installation that you shall be using for this session would be the 'Advanced Installation' method which uses Ansible playbooks for automating the installation of OpenShift Container Platform cluster (version 3.5). The host preparation and prerequisites needed for the installation have already been done.

Step 1. Examining the provided Ansible inventory file - Let us start by examining the Ansible inventory files which contains the host information. To perform the further steps, you will need to run the commands on the 'master' host.

[OSEv3:children]
masters
nodes
etcd
[OSEv3:vars]
ansible_ssh_user=ec2-user
ansible_ssh_private_key_file=/home/ec2-user/.ssh/id_rsa
ansible_ssh_extra_args="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=false"
ansible_become=true

Application Management Basics

Topic 1 - To deploy a sample application (Explain Pod, Services, Routes, DCs, BCs, PV, PVCs (CNS))

In this module,you would deploy a sample application using the 'oc' tool and go through some features like pods, services, routes, etc.

We would deploy a sample application from a DockerHub image.

---
- hosts: master.unset.ocp-admin.aws.openshifttestdrive.com
tasks:
@kmurudi
kmurudi / hosts
Created July 14, 2017 02:43
/etc/ansible/hosts
[OSEv3:children]
masters
nodes
etcd
[OSEv3:vars]
ansible_ssh_user=ec2-user
ansible_ssh_private_key_file=/home/ec2-user/.ssh/id_rsa
ansible_ssh_extra_args="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=false"
ansible_become=true