Skip to content

Instantly share code, notes, and snippets.

Avatar

Court cocampbe

  • TX
View GitHub Profile
@cocampbe
cocampbe / info.txt
Created Jun 18, 2020
Deploying the isilon csi in rancher RKE
View info.txt
This is a short guide to using helm3 to deploy the isilon csi in rancher RKE. I have tested it in RKE k8s versions 1.16 and 1.17.
NOTE: EMC should be your main source for updates.
1. Edit your custom cluster. This is best done ny editing the YAML for the cluster. You need to add the feature gates
to the api, controller, scheduler, and kubelet.
Here is sample yaml you can use as a guide.
```
@cocampbe
cocampbe / create_ansible_hosts_file.py
Last active Sep 17, 2019
Use this via cron to create a dynamic inventory file. As servers are added/removed from spacewalk, or satellite, your inventory file will be updated.
View create_ansible_hosts_file.py
#!/usr/bin/env python3
'''
create_ansible_hosts_file.py
create ansible inventory file from servers in spacewalk and satellite
by: @cocampbe
'''
from subprocess import run,PIPE
@cocampbe
cocampbe / docker_install.sh
Created Aug 29, 2019
edited script for installing docker on RHEL based OS. Modified from kubernetes.io install snip.
View docker_install.sh
# Install Docker CE
## Set up the repository
### Install required packages.
yum install -y yum-utils device-mapper-persistent-data lvm2
### Add Docker repository.
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
@cocampbe
cocampbe / ssh_copy_id.yml
Created Mar 14, 2019
Simple ansible playbook to push ssh public key to hosts
View ssh_copy_id.yml
---
- hosts: all
gather_facts: false
become: no
tasks:
- name: copy ssh key public key
lineinfile:
line: 'your_public key string'
path: /home/your_home_directory/.ssh/authorized_keys
create: yes
@cocampbe
cocampbe / change_ip.yml
Last active Aug 9, 2018
Example of changing an ip address on a EL host using the ansible nmcli module
View change_ip.yml
- hosts: server123
gather_facts: no
become: yes
name: change network config prior to failover
tasks:
- block:
- nmcli:
type: ethernet
conn_name: 'eth0'
ip4: '192.168.99.34/24'
View gist:f4437e6b7d666c0cd5a48cb60c795b57
Found this info here: http://blog.ls-al.com/oracle-vm-ovm-rest-api/
Had trouble finding the rest calls to create a vm clone from a template.
## CloneVM failing
## The value for the argument "serverPoolId" was found to be null
def cloneVm(s,baseUri,templateVm,vmName):
repo_id=get_id_from_name(s,baseUri,'Repository','ovs1')
sp_id=get_id_from_name(s,baseUri,'ServerPool','ovs-home')
template_id=get_id_from_name(s,baseUri,'Vm',templateVm)