Skip to content

Instantly share code, notes, and snippets.

View cocampbe's full-sized avatar

Court cocampbe

  • TX
View GitHub Profile
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)
@cocampbe
cocampbe / change_ip.yml
Last active August 9, 2018 19:22
Example of changing an ip address on a EL host using the ansible nmcli module
- 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'
@cocampbe
cocampbe / ssh_copy_id.yml
Created March 14, 2019 13:17
Simple ansible playbook to push ssh public key to hosts
---
- 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 / docker_install.sh
Created August 29, 2019 11:56
edited script for installing docker on RHEL based OS. Modified from kubernetes.io install snip.
# 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 / create_ansible_hosts_file.py
Last active September 17, 2019 20:01
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.
#!/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 / info.txt
Created June 18, 2020 14:33
Deploying the isilon csi in rancher RKE
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.
```

These are my observations related to oracle weblogic 12c nodemanagers.

  1. The nodemanager (NM) username and password are note related to the admin console (AC) and enterprise manager usernames and passwords.
  2. You can change the NM username and password via wlst in offline mode.
  3. Once changed, you need to restart NM.
  4. If you have a cluster, the node manager on the other nodes is not update with the new passsword. You need to copy the $DOMAIN_HOME/config/nodemanager/nm_password.properties file to the other machines in the cluster.
  5. If you do not want to have to supply the NM username and password in WLST scripts, you need to run the storeUserConfig command and save the config and key files in a directory called .wlst in the home folder of the user running the wlst command. You must also the nm to "true". This in an example: