Skip to content

Instantly share code, notes, and snippets.

View spinolacastro's full-sized avatar

Diego Castro (dscastro) spinolacastro

  • Buenos Aires - Argentina
View GitHub Profile
---
kind: "Template"
apiVersion: "v1"
metadata:
name: "project-request"
creationTimestamp: null
objects:
-
kind: "Project"
apiVersion: "v1"
#!/bin/bash
echo 1
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
etcd
[OSEv3:vars]
ansible_ssh_user=azureuser
ansible_sudo=true
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"imagePublisher": {
"type": "string",
"defaultValue": "OpenLogic",
"metadata": {
"description": "Image Publisher"
}
I0111 22:28:15.563942 1 source.go:145] Cloning source from https://github.com/spinolacastro/php55
2 Step 0 : FROM openshift/php-55-centos7@sha256:72767e018fc41cdb6868ac88f7a58368ca2b4c2436628b12b6a1ef4418238f0a
3 ---> a65c1de10ef2
4 Step 1 : USER root
5 ---> Using cache
6 ---> de275d745c3e
7 Step 2 : RUN yum clean all && yum -y reinstall glibc-common && yum clean all -y
8 ---> Running in e855a1dc5620
9 Loaded plugins: fastestmirror
10 Cleaning repos: base centos-sclo-rh centos-sclo-sclo epel extras updates
[root@origintest0 ~]# oc get pods
NAME READY STATUS RESTARTS AGE
docker-registry-2-ta860 1/1 Running 1 14m
router-2-wwyc0 1/1 Running 1 14m
[root@origintest0 ~]# oc get svc
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
docker-registry 172.30.175.76 <none> 5000/TCP docker-registry=default 1h
kubernetes 172.30.0.1 <none> 443/TCP,53/UDP,53/TCP <none> 4h
router 172.30.215.236 <none> 80/TCP router=router 1h
#!/usr/bin/env python
from boto import ec2
from boto import utils
from datetime import datetime, timedelta
region = utils.get_instance_metadata()['placement']['availability-zone'][:-1]
conn = ec2.connect_to_region(region)
instance_id = utils.get_instance_metadata()['instance-id']
def get_volumes():
kind: "BuildConfig"
apiVersion: "v1"
metadata:
name: "jboss-custom"
spec:
triggers:
-
type: "Generic"
generic:
secret: "secret101"
@spinolacastro
spinolacastro / gist:4f43093725d5e4e1caf95d539652f4c0
Created March 29, 2016 21:03
Kubernetes Ceph Volume Recycler
#!/bin/bash
AVAILABLE_VOLUMES=30
VOLUME_SIZE="1Gi 2Gi 5Gi 10Gi"
OSM="osmbr1:6789"
KEYRING="/etc/ceph/ceph.client.openshift.keyring"
POOL=rbd
USER=openshift
[root@nodebr1 ~]# iptables -nv -L
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
4037K 6930M ACCEPT all -- tun0 * 0.0.0.0/0 0.0.0.0/0 /* traffic from docker for internet */
32M 8443M ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 4789 /* 001 vxlan incoming */
1 389 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:68
23M 15G ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
5 420 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
121 7260 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
11 660 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22