This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: template.openshift.io/v1 | |
kind: Template | |
labels: | |
app: jenkins-ephemeral | |
template: jenkins-ephemeral-template | |
message: A Jenkins service has been created in your project. Log into Jenkins with | |
your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md | |
contains more information about using this template. | |
metadata: | |
annotations: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compliments of Nate Revo :-) | |
---- Virtual Bridge on Controllers ---- | |
export MAIN_CONN=enp2s0 | |
export MAIN_IP="192.168.3.11" | |
systemctl stop libvirtd | |
nmcli c delete "$MAIN_CONN" | |
nmcli c delete "System $MAIN_CONN" | |
nmcli c add type bridge ifname br0 autoconnect yes con-name br0 stp off | |
nmcli c modify br0 ipv4.addresses $MAIN_IP/24 ipv4.method manual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
verbose=1 | |
#Enable verbose console output | |
verbose_print() | |
{ | |
if [[ $verbose -eq 1 ]] ; then | |
echo "$1" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# From an ocp master: | |
# create the secret from the node cert bundle | |
oc create secret generic ca-certificate --from-file=/etc/pki/tls/certs/ca-bundle.crt --from-file=/etc/pki/tls/certs/ca-bundle.trust.crt | |
# attach the secret as a volume to the docker registry pod | |
oc set volume dc docker-registry --add -m /etc/pki/tls/certs/ -t secret --secret-name ca-certificate -n default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | sed 1q) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now using project "glusterfs" on server "https://master1.internal:443". | |
[root@bastion ~]# oc get pods | |
NAME READY STATUS RESTARTS AGE | |
glusterblock-storage-provisioner-dc-1-2crqc 1/1 Running 1 13h | |
glusterfs-storage-6kkhx 1/1 Running 1 13h | |
glusterfs-storage-fzfqx 1/1 Running 1 13h | |
glusterfs-storage-xkgsg 1/1 Running 1 13h | |
heketi-storage-1-z8dzg 1/1 Running 1 13h | |
[root@bastion ~]# oc rsh heketi-storage-1-z8dzg | |
sh-4.2# export HEKETI_CLI_KEY=$HEKETI_ADMIN_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Export a CA bundle from a web site | |
printf '' | openssl s_client -showcerts -connect $HOST:$PORT 2>/dev/null | sed -e '/^-----BEGIN CERTIFICATE-----$/,/^-----END CERTIFICATE-----$/ !d' | |
# Export OpenShift image streams names for downloading with docker manual | |
oc get --export is -n openshift -o json | jq -r '.items[].spec.tags[].from.name' > image-names.json | |
#Flipping your upstream image stream registry reference to --insecure | |
# Export OpenShift image streams for editing | |
oc get --export is -n openshift -o json > image-streams.json |