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
mkdir ~/.kube && sudo cp /var/lib/microshift/resources/kubeadmin/kubeconfig ~/.kube/config | |
sudo chown -R ec2-user:ec2-user ~/.kube | |
curl -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz | |
tar -xzvf oc.tar.gz | |
sudo install -t /usr/local/bin oc | |
rm oc.tar.gz oc kubectl README.md | |
SNAPSHOTTER_VERSION=v4.2.1 | |
# Change to the latest supported snapshotter version |
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
1. Edit /etc/default/grub | |
- Append `systemd.unified_cgroup_hierarchy=1` to line `GRUB_CMDLINE_LINUX=` | |
2. Generate grub config file | |
```shell | |
grub2-mkconfig -o /boot/grub2/grub.cfg | |
``` | |
3. reboot |
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
--- | |
dest-access-mode: ReadWriteOnce | |
dest-namespace: dest | |
dest-copy-method: Snapshot | |
source-pvc: mysql-pv-claim | |
source-copy-method: Snapshot | |
source-namespace: source | |
dest-service-type: LoadBalancer | |
source-service-type: LoadBalancer | |
source-cron-spec: '*/2 * * * *' |
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
#!/usr/bin/env sh | |
# Setting up some colors for helping read the demo output. | |
# Comment out any of the below to turn off that color. | |
bold=$(tput bold) | |
bright=$(tput setaf 14) | |
yellow=$(tput setaf 11) | |
red=$(tput setaf 196) | |
reset=$(tput sgr0) |
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 | |
set -euxo pipefail | |
final-check () { | |
if | |
! oc wait co --all --for='condition=Available=True' --timeout=20s 1>/dev/null || \ | |
! oc wait co --all --for='condition=Progressing=False' --timeout=20s 1>/dev/null || \ | |
! oc wait co --all --for='condition=Degraded=False' --timeout=20s 1>/dev/null; then | |
echo "Some ClusterOperators Degraded=True,Progressing=True,or Available=False" |
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 | |
NAME="$1" | |
if [ -z "$NAME" ]; then | |
echo "usage: create-cluster <name>" | |
exit 1 | |
fi | |
CLUSTER_DIR="${HOME}/clusters/${NAME}" | |
if [ -d "${CLUSTER_DIR}" ]; then |
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 | |
set -euxo pipefail | |
trap "rm -rf create-registry-certs" EXIT | |
# Set up local registry with long-lived certs with SAN | |
# if in gcp instance | |
#HOSTNAME=$(curl "http://metadata.google.internal/computeMetadata/v1/instance/hostname" -H "Metadata-Flavor: Google") | |
HOSTNAME=localhost | |
sudo dnf -y install podman httpd httpd-tools make |
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
## OpenShift4 pull-secret: | |
1. Download your pull-secret from [console.redhat.com](https://console.redhat.com/openshift/install/aws/installer-provisioned) | |
- click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret | |
2. Add the apps.ci auth to pull-secret! _internal OpenShift developers only_ | |
- Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request | |
copy the oc login cmd and paste in terminal to login to the ci cluster, then run this: | |
- `$ oc registry login --to ~/some-dir/pull-secret` | |
This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also | |
make the pull-secret multi-line. |
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
Thank You!! | |
Resources | |
CRI-O | |
https://github.com/cri-o/cri-o | |
https://cri-o.io | |
Buildah | |
https://github.com/containers/buildah | |
https://buildah.io |
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/sh | |
# Setting up some colors for helping read the demo output. | |
bold=$(tput bold) | |
bright=$(tput setaf 14) | |
yellow=$(tput setaf 11) | |
reset=$(tput sgr0) | |
# commands | |
read_bright() { |