An open API service indexing awesome lists of open source software.

https://github.com/srbala/snc

Local copy of OKD (Open Source version of OpenShift), single node cluster installation steps. Original sources available at https://github.com/code-ready/snc
https://github.com/srbala/snc

k8s k8s-cluster okd openshift openshift-deployment

Last synced: 2 months ago
JSON representation

Local copy of OKD (Open Source version of OpenShift), single node cluster installation steps. Original sources available at https://github.com/code-ready/snc

Awesome Lists containing this project

README

          

# Single node cluster (SNC) scripts for OpenShift 4

## How to use?
- Make sure the one time system requirements setup is satisfied. (https://github.com/openshift/installer/blob/master/docs/dev/libvirt/README.md#one-time-setup)
- Clone this repo `git clone https://github.com/code-ready/snc.git`
- `cd `
- `./snc.sh`

## How to create disk image?
- Once your `snc.sh` script run successfully.
- You need to wait for around 30 mins till cluster settle.
- `./createdisk.sh crc-tmp-install-data`

## Monitoring

The installation is a [long process](https://github.com/openshift/installer/blob/master/docs/user/overview.md#cluster-installation-process). It can take up to 45 mins.
You can monitor the progress of the installation with `kubectl`.

```
$ export KUBECONFIG=/crc-tmp-install-data/auth/kubeconfig
$ kubectl get pods --all-namespaces
```

## Building SNC for OKD 4
- Before running `./snc.sh`, you need to create a pull secret file, and set a couple of environment variables to override the default behavior.
- Select the OKD 4 release that you want to build from: [https://origin-release.apps.ci.l2s4.p1.openshiftapps.com](https://origin-release.apps.ci.l2s4.p1.openshiftapps.com)
- For example, to build release: 4.6.0-0.okd-2021-01-23-132511

```bash
# Create a pull secret file

cat << EOF > /tmp/pull_secret.json
{"auths":{"fake":{"auth": "Zm9vOmJhcgo="}}}
EOF

# Set environment for OKD build
export OKD_VERSION=4.6.0-0.okd-2021-01-23-132511
export OPENSHIFT_PULL_SECRET_PATH="/tmp/pull_secret.json"

# Build the Single Node cluster
./snc.sh
```

- When the build is complete, create the disk image as described below.

```
export BUNDLED_PULL_SECRET_PATH="/tmp/pull_secret.json"
./createdisk.sh crc-tmp-install-data
```

## Troubleshooting

OpenShift installer will create 2 VMs. It is sometimes useful to ssh inside the VMs.
Add the following lines in your `~/.ssh/config` file. You can then do `ssh master` and `ssh bootstrap`.

```
Host master
Hostname 192.168.126.11
User core
IdentityFile /id_ecdsa_crc
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

Host bootstrap
Hostname 192.168.126.10
User core
IdentityFile /id_ecdsa_crc
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
```

Please note the SNC project is “as-is” on this Github repository. At this time, it is not an offically supported Red Hat solution.