Skip to content

Instantly share code, notes, and snippets.

View seomin3's full-sized avatar

Jahyeon Koo seomin3

  • Seoul, Korea
View GitHub Profile
@seomin3
seomin3 / block-device-default.yaml
Last active May 31, 2019 08:16
Example manual partioning in the Guest image that use to the disk-image-create.
# ref: https://docs.openstack.org/diskimage-builder/latest/user_guide/building_an_image.html
- local_loop:
name: image0
size: 64GiB
- partitioning:
base: image0
label: mbr
partitions:
- name: root
@seomin3
seomin3 / userdata.yaml
Created May 30, 2019 04:41
userdata of the NSSF environment
#cloud-config
users:
- default
- name: root
network:
version: 2
ethernets:
eth0:
dhcp6: true
from kubernetes import client, config
from kubernetes.client.rest import ApiException
pod_binarys = []
pods = {}
nodes = ['tscontrol1', 'tscontrol2', 'tscontrol3']
# Configs can be set in Configuration class directly or using helper utility
config.load_kube_config()
@seomin3
seomin3 / all.yml
Created April 8, 2019 07:30
Kubernetes with LBaaS of OpenStack
bootstrap_os: centos
etcd_data_dir: /var/lib/etcd
bin_dir: /usr/local/bin
cloud_provider: openstack
openstack_lbaas_enabled: True
openstack_lbaas_subnet_id: "398c0136-af16-45e9-95be-d276eb8bcbd0"
openstack_lbaas_floating_network_id: "70f4cb52-7305-484d-9f71-e4d51f689e14"
openstack_lbaas_use_octavia: False
openstack_lbaas_method: "ROUND_ROBIN"
openstack_lbaas_provider: "haproxy"
@seomin3
seomin3 / create-repoconf-for-yum.sh
Created March 13, 2019 05:15
implement private yum repository
#!/bin/bash
for i in base updates extras centos-openstack-ocata centos-qemu-ev; do
echo "[$i]
name=$i
baseurl=http://192.168.123.137:8080/repo/$i
enabled=1
gpgcheck=0
"
done
@seomin3
seomin3 / hosts.operation
Last active March 11, 2019 01:48
openshift inventory for lab environment
[masters]
openshift-master0[1:3].test.example.com
[etcd]
openshift-master0[1:3].test.example.com
[nodes]
openshift-master0[1:3].test.example.com openshift_node_group_name="node-config-master"
openshift-infra0[1:2].test.example.com openshift_node_group_name="node-config-infra"
openshift-node0[1:2].test.example.com openshift_node_group_name="node-config-compute"
[nfs]
openshift-master01.test.example.com
@seomin3
seomin3 / main.yml
Created February 28, 2019 08:50
reboot after change selinux config
- name: turn off selinux
selinux:
policy: targeted
state: permissive
register: selinux_result
- name: check kernel cmdline
lineinfile:
dest: /proc/cmdline
line: "user_namespace.enable=1"
@seomin3
seomin3 / create-snapshot.sh
Last active November 16, 2018 05:23
If instance status are shutoff, create snapshot that.
#!/usr/bin/env bash
set -x
# debug mode
debug=${1:-false}
download=${2:-false}
# today' date
snapshot_date=$(date +%y%m%d)
@seomin3
seomin3 / parser-nova-hypervisor-stat.py
Last active September 3, 2018 05:48
parser few key of nova hypervisor-stat
#!/usr/bin/env python2
import simplejson as json
import csv
with open('hlm_180903.log', 'r') as fn:
array = []
for stat_str in fn:
array.append(stat_str)
with open('tango-hypervisor-stat.csv', mode='w') as stat_file:
@seomin3
seomin3 / control_plane.yml
Created August 21, 2018 06:13
control_plane.yml without monasca for HOS
---
product:
version: 2
control-planes:
- name: control-plane-1
control-plane-prefix: cp1
region-name: region1
failure-zones:
- AZ1