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
| chronybase64=$(cat << EOF | base64 -w 0 | |
| server 0.fi.pool.ntp.org iburst | |
| server 1.fi.pool.ntp.org iburst | |
| server 2.fi.pool.ntp.org iburst | |
| server 3.fi.pool.ntp.org iburst | |
| driftfile /var/lib/chrony/drift | |
| makestep 1.0 3 | |
| rtcsync | |
| keyfile /etc/chrony.keys | |
| leapsectz right/UTC |
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
| # CentOS 8 - Install Latest Podman | |
| sudo dnf -y module disable container-tools | |
| sudo dnf -y install 'dnf-command(copr)' | |
| sudo dnf -y copr enable rhcontainerbot/container-selinux | |
| sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo | |
| sudo dnf -y install podman | |
| RHEL8.x/CENTOS8.x | |
| podman version 1.8+ |
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
| # CentOS 8 - Install Latest Podman | |
| sudo dnf -y module disable container-tools | |
| sudo dnf -y install 'dnf-command(copr)' | |
| sudo dnf -y copr enable rhcontainerbot/container-selinux | |
| sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo | |
| sudo dnf -y install podman | |
| #### |
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: config.openshift.io/v1 | |
| kind: OAuth | |
| metadata: | |
| name: cluster | |
| spec: | |
| identityProviders: | |
| - name: ldapidp | |
| mappingMethod: claim | |
| type: LDAP | |
| ldap: |
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 | |
| AUTH_NAME="auth2kube" | |
| NEW_KUBECONFIG="newkubeconfig" | |
| echo "create a certificate request for system:admin user" | |
| openssl req -new -newkey rsa:4096 -nodes -keyout $AUTH_NAME.key -out $AUTH_NAME.csr -subj "/CN=system:admin/O=system:masters" | |
| echo "create signing request resource definition" |
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
| Fist, Create a MachineConfigPool | |
| ---- | |
| apiVersion: machineconfiguration.openshift.io/v1 | |
| kind: MachineConfigPool | |
| metadata: | |
| name: infra | |
| spec: | |
| machineConfigSelector: | |
| matchExpressions: |
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
| oc edit Network.config.openshift.io cluster | |
| --- | |
| # Please edit the object below. Lines beginning with a '#' will be ignored, | |
| # and an empty file will abort the edit. If an error occurs while saving this file will be | |
| # reopened with the relevant failures. | |
| # | |
| apiVersion: config.openshift.io/v1 | |
| kind: Network | |
| metadata: |
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
| yum install dnsmasq -y | |
| systemctl enable dnsmasq | |
| cat > /etc/dnsmasq.d/ocp.conf << EOF | |
| listen-address=127.0.0.1 | |
| bind-interfaces | |
| addn-hosts=/etc/hosts.dnsmasq | |
| address=/apps.ocp.ocp4.local/192.168.150.10 | |
| enable-tftp | |
| tftp-root=/tftpboot |
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
| wget https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.2.2004-20200611.2.x86_64.qcow2 | |
| qemu-img create -f qcow2 -b /var/lib/libvirt/images/CentOS-8-GenericCloud-8.2.2004-20200611.2.x86_64.qcow2 /var/lib/libvirt/images/provisioner.qcow2 120G | |
| virt-resize --expand /dev/vda1 /var/lib/libvirt/images/CentOS-8-GenericCloud-8.2.2004-20200611.2.x86_64.qcow2 /var/lib/libvirt/images/provisioner.qcow2 | |
| virt-customize -a /var/lib/libvirt/images/provisioner.qcow2 --root-password password:Redhat01 --uninstall cloud-init \ | |
| --hostname provisioner.ocp.ralvares.com \ | |
| --run-command 'yum update -y' |
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
| # Community operators CatalogSource | |
| ## Download and Install opm tool | |
| wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.7/opm-linux.tar.gz | |
| tar xzvf opm-linux.tar.gz | |
| mv opm /usr/local/bin | |
| ## Login to redhat registry | |
| podman login registry.redhat.io |