Skip to content
/ snc Public

Single Node Cluster creation scripts for OpenShift 4.x as used by CodeReady Containers

License

Notifications You must be signed in to change notification settings

crc-org/snc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1bd80bf · Feb 25, 2025
Feb 25, 2025
Dec 11, 2021
Jul 10, 2024
Jul 7, 2023
Sep 24, 2024
Sep 30, 2022
Mar 18, 2021
Apr 6, 2021
Jan 31, 2025
May 11, 2021
May 26, 2020
Jul 6, 2020
Mar 20, 2024
Jan 29, 2025
Sep 24, 2024
Sep 24, 2024
Oct 4, 2022
Oct 4, 2022
Jul 7, 2020
Jan 13, 2025
Jan 13, 2025
Feb 19, 2025
Oct 14, 2021
Feb 13, 2023
Jan 12, 2023
Jul 1, 2024
Feb 27, 2024
Jun 12, 2024
May 6, 2021
Feb 12, 2025
Dec 5, 2022
Dec 23, 2024
Jul 12, 2019
Jun 18, 2024
Dec 7, 2022
Nov 3, 2022
Jul 7, 2023
Jun 13, 2022
Feb 7, 2025
Sep 30, 2024
Jan 31, 2025
Jan 13, 2025
Sep 3, 2024

Repository files navigation

Single node cluster (snc) scripts for OpenShift 4

NOTE: Please select the respective branch to create a bundle for a specific OpenShift release (ie. to create a 4.15.x OpenShift bundle, choose the release-4.15 branch)

How to use?

  • Clone this repo git clone https://github.com/code-ready/snc.git
  • cd <directory_to_cloned_repo>
  • ./snc.sh

How to create disk image?

  • Once your snc.sh script run successfully.
  • ./createdisk.sh crc-tmp-install-data

Monitoring

The installation is a long process. It can take up to 45 mins. You can monitor the progress of the installation with kubectl.

$ export KUBECONFIG=<directory_to_cloned_repo>/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
  • For example, to build release: 4.5.0-0.okd-2020-08-12-020541
# 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.5.0-0.okd-2020-08-12-020541
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

Creating container image for bundles

After running snc.sh/createdisk.sh, the generated bundles can be uploaded to a container registry using this command:

./gen-bundle-image.sh <version> <openshift/okd/podman>

Note: a GPG key is needed to sign the bundles before they are wrapped in a container image.

Troubleshooting

OpenShift installer will create 1 VM. It is sometimes useful to ssh inside the VM. Add the following lines in your ~/.ssh/config file. You can then do ssh master.

Host master
    Hostname 192.168.126.11
    User core
    IdentityFile <directory_to_cloned_repo>/id_ecdsa_crc
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null

Environment Variables

The following environment variables can be used to change the default values of bundle generation.

SNC_GENERATE_MACOS_BUNDLE : if set to 0, bundle generation for MacOS is disabled, any other value will enable it. SNC_GENERATE_WINDOWS_BUNDLE : if set to 0, bundle generation for Windows is disabled, any other value will enable it. SNC_GENERATE_LINUX_BUNDLE : if set to 0, bundle generation for Linux is disabled, any other value will enable it.

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