Skip to content

Instantly share code, notes, and snippets.

View yuhkih's full-sized avatar

Yuhki Hanada yuhkih

View GitHub Profile
#!/bin/bash
curl -LO https://github.com/openshift-online/ocm-cli/releases/download/v0.1.64/ocm-linux-amd64
chmod +x ocm-linux-amd64
mv ocm-linux-amd64 ocm
sudo mv ./ocm /usr/local/bin/
echo "this is tech preview"
echo "get started is here. https://access.redhat.com/articles/6114701"
#!/bin/bash
VPC_NETWORK=10.7.0.0/16 # VPC の Network
VPC_SUBNET_PUBLIC=10.7.128.0/17 # VPC 内の Public Subnet
VPC_SUBNET_PRIVATE=10.7.0.0/17 # VPC 内の Private Subnet
# Create a VPC
echo "[STEP1] Create VPC " $VPC_NETWORK
VPC_ID=`aws ec2 create-vpc --cidr-block $VPC_NETWORK | jq -r .Vpc.VpcId`
aws ec2 modify-vpc-attribute --vpc-id $VPC_ID --enable-dns-hostnames | jq .
cat << EOF > cli-install.sh
#!/bin/bash
# [OLD] curl -LO https://mirror.openshift.com/pub/openshift-v4/clients/rosa/latest/rosa-linux.tar.gz
curl -LO https://mirror.openshift.com/pub/cgw/rosa/latest/rosa-linux.tar.gz
tar -zxf rosa-linux.tar.gz
sudo mv ./rosa /usr/local/bin/
rosa download oc
tar -xzf openshift-client-linux.tar.gz
sudo mv ./oc /usr/local/bin
sudo mv ./kubectl /usr/local/bin
$ echo 'apiVersion: batch/v1
kind: Job
metadata:
generateName: work-queue-
spec:
template:
spec:
containers:
- name: work
image: busybox
@yuhkih
yuhkih / rosa edit machinepool
Created August 9, 2022 04:35
rosa edit machinepool command help
$ rosa edit machinepool --help
Edit machine pools on a cluster.
Usage:
rosa edit machinepool ID [flags]
Aliases:
machinepool, machinepools, machine-pool, machine-pools
Examples:
@yuhkih
yuhkih / netnamespace
Created August 9, 2022 01:26
OpenShift netnamespace resource
apiVersion: network.openshift.io/v1
kind: NetNamespace
metadata:
creationTimestamp: "2022-05-30T07:37:37Z"
generation: 1
name: egressip
resourceVersion: "184904"
uid: 68b8a911-ebd5-4009-84c9-42c2a74e00a7
netid: 10333360
netname: egressip