Code Monkey home page Code Monkey logo

crc-cloud's Introduction

CRC Cloud - Runs Containers in the Cloud

Disposable OpenShift instances on cloud in minutes

CRC Cloud

This project is stumbled upon OpenSpot made by @ksingh7 and all the improvements made by @tsebastiani creating the next generation for openspot were he got rid off bare metal hard requirement for running the single-node cluster on the cloud.

Disclaimer

This project has been developed for experimental purpose only and it's not absolutely meant to run production clusters.

The authors are not responsible in any manner of any cost on which the user may incur for inexperience or software failure.

Before running the script be sure to have an adequate experience to safely create and destroy resources on AWS or any other cloud provider that will be supported without the help of this software in order to recover manually from possible issues.

Overview

This is a side project of Openshift Local formerly CRC, while CRC and crc cli main purpose is spin Openshift Single Node clusters on local development environments (it works multi-platform and multi-arch), crc-cloud will offer those clusters on cloud (multi-provider).

The following diagram shows what is the expected interaction between an user of crc-cloud and the assets provided by CRC:

crc-cloud flow

Usage

To facilite the usage of crc-cloud, a container image is offered with all required dependecies. Using the container all 3 supported operation can be executed

Authetication

All operations require to set the authentication mechanism in place.

As so any aws authentication mechanism is supported by crc-cloud:

  • long term credentials AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as environment variables
  • short lived credentials (in addition to AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY would require AWS_SESSION_TOKEN)
  • credentials on config file (default file ~/.aws/config), in case of multiple profiles it will also accepts AWS_PROFILE

As so any gcp authentication mechanism is supported by crc-cloud:

  • Credentials GOOGLE_APPLICATION_CREDENTIALS as environment variable
  • Project ID GCLOUD_PROJECT as environment variable
  • Region GCLOUD_REGION as environment variable
  • Zone GCLOUD_ZONE as environment variable

As so any openstack authentication mechanism is supported by crc-cloud:

Restrictions

Note: import operation is not supported on gcp and openstack provider.

As of now please use following manual steps to import the image on gcp:

# Download the required bundle from https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/crc/bundles/openshift/
curl -L -O https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.14.3/crc_libvirt_4.14.3_amd64.crcbundle
# Extract the bundle
tar -xvf crc_libvirt_4.14.3_amd64.crcbundle && cd crc_libvirt_4.14.3_amd64
# Convert the qcow2 image to raw
qemu-img convert crc.qcow2 disk.raw
# Compress the raw image to tar.gz
tar --format=oldgnu -Sczf /tmp/crc.tar.gz disk.raw
# Upload the tar.gz to GCS
gsutil cp /tmp/crc.tar.gz gs://crc-bundle-github-ci
# Create the image on GCP
gcloud compute images create crc --source-uri  gs://crc-bundle-github-ci/crc.tar.gz
# List the images and check for crc one
gcloud compute images list --no-standard-images | grep crc

As of now please use following manual steps to import the image on openstack:

# Download the required bundle from https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/crc/bundles/openshift/
curl -L -O https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.14.3/crc_libvirt_4.14.3_amd64.crcbundle
# Extract the bundle
tar -xvf crc_libvirt_4.14.3_amd64.crcbundle && cd crc_libvirt_4.14.3_amd64
# Convert the qcow2 image to raw
qemu-img convert crc.qcow2 crc.raw
# Upload the raw image to openstack
openstack image create --disk-format raw --file crc.raw  --tag openshift-local --progress openshift-local-4.14.3

The import operation downloads and transform the bundle offered by crc into an image supported by AWS, as so there are some disk demanding operation. So there is a requirement of at least 70G free on disk to run this operation.

The AWS instance type of choice is c6a.2xlarge with 8vcpu and 16 GB of RAM. This will be customizable in the future, for the moment this fixed type imposes some restrictions on available regions to run crc cloud, those regions are:

  • us-east-1 and us-east-2
  • us-west-1 and us-west-2
  • ap-south-1, ap-southeast-1, ap-southeast-2 and ap-northeast-1
  • eu-west-1, eu-central-1 and eu-west-2

Operations

Import

import operation uses crc official bundles, transform them and import as an AMI on the user account. It is required to run import operation on each region where the user wants to sping the cluster.

Usage:

import crc cloud image

Usage:
  crc-cloud import [flags]

Flags:
      --backed-url string              backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket
      --bundle-shasumfile-url string   custom url to download the shasum file to verify the bundle artifact
      --bundle-url string              custom url to download the bundle artifact
  -h, --help                           help for import
      --output string                  path to export assets
      --tags                           tags to add on each resource (--tags name1=value1,name2=value2)
      --project-name string            project name to identify the instance of the stack
      --provider string                target cloud provider

Outputs:

  • image-id file with the ami-id of the imported image
  • id_ecdsa this is key required to spin the image. (It will be required on create operation, is user responsability to store this key)

Sample

podman run -d --rm \
    -v ${PWD}:/workspace:z \
    -e AWS_ACCESS_KEY_ID=${access_key_value} \
    -e AWS_SECRET_ACCESS_KEY=${secret_key_value} \
    -e AWS_DEFAULT_REGION=eu-west-1 \
    quay.io/crcont/crc-cloud:v0.0.2 import \
        --project-name "ami-ocp412" \
        --backed-url "file:///workspace" \
        --output "/workspace" \
        --tags version=nightly \
        --provider "aws" \
        --bundle-url "https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.12.5/crc_libvirt_4.12.5_amd64.crcbundle" \
        --bundle-shasumfile-url "https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.12.5/sha256sum.txt"

Create

create operation is responsible for create all required resources on the cloud provider to spin the Openshift Single Node Cluster.

Usage: In case of aws provider

create crc cloud instance on AWS

Usage:
  crc-cloud create aws [flags]

Flags:
      --aws-ami-id string           AMI identifier
      --aws-disk-size string        Disk size in GB for the machine running the cluster. Default is 100.
      --aws-instance-type string    Instance type for the machine running the cluster. Default is c6a.2xlarge.
  -h, --help                        help for aws

Global Flags:
      --backed-url string            backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket
      --key-filepath string          path to init key obtained when importing the image
      --output string                path to export assets
      --tags                         tags to add on each resource (--tags name1=value1,name2=value2)
      --project-name string          project name to identify the instance of the stack
      --pullsecret-filepath string   path for pullsecret file

Usage: In case of gcp provider

create crc cloud instance on GCP

Usage:
  crc-cloud create gcp [flags]

Flags:
      --gcp-disk-size string       Disk size in GB for the machine running the cluster. Default is 100.
      --gcp-image-id string        GCP image identifier
      --gcp-instance-type string   Instance type for the machine running the cluster. Default is n1-standard-8.
  -h, --help                       help for gcp

Global Flags:
      --backed-url string            backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket
      --key-filepath string          path to init key obtained when importing the image
      --output string                path to export assets
      --project-name string          project name to identify the instance of the stack
      --pullsecret-filepath string   path for pullsecret file
      --tags stringToString          tags to add on each resource (--tags name1=value1,name2=value2) (default [])

Usage: In case of openstack provider

create crc cloud instance on OpenStack

Usage:
  crc-cloud create openstack [flags]

Flags:
      --disk-size string   Disk size in GB for the machine running the cluster. Default is 100.
      --flavor string      OpenStack flavor type for the machine running the cluster. Default is m1.xlarge.
  -h, --help               help for openstack
      --image string       OpenStack image identifier
      --network string     OpenStack network name for the machine running the cluster.

Global Flags:
      --backed-url string            backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket
      --key-filepath string          path to init key obtained when importing the image
      --output string                path to export assets
      --project-name string          project name to identify the instance of the stack
      --pullsecret-filepath string   path for pullsecret file
      --tags stringToString          tags to add on each resource (--tags name1=value1,name2=value2) (default [])

Outputs:

  • kubeconfig file with the kube config to connect withint the cluster
  • host file containing host address running the cluster
  • username file containing the username to connect the remote host
  • id_rsa key to connect the remote host
  • password password generated for kubeadmin and developer default cluster users

Sample for aws provider:

podman run -d --rm \
    -v ${PWD}:/workspace:z \
    -e AWS_ACCESS_KEY_ID=${access_key_value} \
    -e AWS_SECRET_ACCESS_KEY=${secret_key_value} \
    -e AWS_DEFAULT_REGION=eu-west-1 \
    quay.io/crcont/crc-cloud:v0.0.2 create aws \
        --project-name "crc-ocp412" \
        --backed-url "file:///workspace" \
        --output "/workspace" \
        --tags account=qe-pt,profile=builder \
        --aws-ami-id "ami-xxxx" \
        --aws-instance-type "c6i.4xlarge" \
        --aws-disk-size "200" \
        --pullsecret-filepath "/workspace/pullsecret" \
        --key-filepath "/workspace/id_ecdsa"

Sample for gcp provider:

podman run -d --rm \
    -v ${PWD}:/workspace:z \
    -e GOOGLE_APPLICATION_CREDENTIALS=${gcp_credentials} \
    -e GCLOUD_PROJECT=${gcp_project_id} \
    -e GCLOUD_REGION=${gcp_region} \
    -e GCLOUD_ZONE=${gcp_zone} \
    quay.io/crcont/crc-cloud:v0.0.2 create gcp \
        --project-name "crc-ocp412" \
        --backed-url "file:///workspace" \
        --output "/workspace" \
        --tags account=qe-pt,profile=builder \
        --gcp-image-id "gcp-xxxx" \
        --gcp-instance-type "n1-standard-8" \
        --gcp-disk-size "100" \
        --pullsecret-filepath "/workspace/pullsecret" \
        --key-filepath "/workspace/id_ecdsa"

Sample for openstack provider:

podman run --rm \
    -v ${PWD}:/workspace:z \
    -e OS_CLOUD=openstack \
    -e OS_CLIENT_CONFIG_FILE=/workspace/prkumar_clouds.yaml \
    quay.io/crcont/crc-cloud:latest create openstack \
    --image openshift-local-4.14.12 \
    --backed-url file:///workspace \
    --project-name crc-ocp414 \
    --output /workspace \
    --key-filepath "/workspace/id_ecdsa" \
    --pullsecret-filepath "/workspace/pull-secret" \
    --disk-size 100 \
    --network provider_net_cci_5 \
    --flavor ocp-master

Destroy

destroy operation will remove any resource created at the cloud provider, it uses the files holding the state of the infrastructure which has been store at location defined by parameter backed-url on create operation.

Usage:

destroy crc cloud instance

Usage:
  crc-cloud destroy [flags]

Flags:
      --backed-url string     backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket
  -h, --help                  help for destroy
      --project-name string   project name to identify the instance of the stack
      --provider string       target cloud provider

Sample for aws provider:

podman run -d --rm \
    -v ${PWD}:/workspace:z \
    -e AWS_ACCESS_KEY_ID=${access_key_value} \
    -e AWS_SECRET_ACCESS_KEY=${secret_key_value} \
    -e AWS_DEFAULT_REGION=eu-west-1 \
    quay.io/crcont/crc-cloud:v0.0.2 destroy \
        --project-name "crc-ocp412" \
        --backed-url "file:///workspace" \
        --provider "aws" 

Sample for gcp provider:

podman run -d --rm \
    -v ${PWD}:/workspace:z \
    -e GOOGLE_APPLICATION_CREDENTIALS=${gcp_credentials} \
    -e GCLOUD_PROJECT=${gcp_project_id} \
    -e GCLOUD_REGION=${gcp_region} \
    -e GCLOUD_ZONE=${gcp_zone} \
    quay.io/crcont/crc-cloud:v0.0.2 destroy \
        --project-name "crc-ocp412" \
        --backed-url "file:///workspace" \
        --provider "gcp"

Sample for openstack provider:

podman run --rm \
    -v ${PWD}:/workspace:z \
    -e OS_CLOUD=openstack \
    -e OS_CLIENT_CONFIG_FILE=/workspace/prkumar_clouds.yaml \
    quay.io/crcont/crc-cloud:latest destroy \
    --provider openstack \
    --backed-url file:///workspace \
    --project-name crc-ocp414

crc-cloud's People

Contributors

adrianriobo avatar danpawlik avatar gbraad avatar lmilbaum avatar platform-engineering-bot avatar praveenkumar avatar renovate[bot] avatar tsebastiani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

crc-cloud's Issues

Feature: use crc-cloud with local deployment

Hi,
The crc-cloud could be running with the local deployment, due there is no need to use the crc-cloud binary to spawn an instance for example on OpenStack cloud.
Let's assume, that someone would like to use the crc-cloud in theirs own cloud in the CI. In current version, the script
requires cloud credentials (for OpenStack) and it will:

  • create a container,
  • it will download a crcbundle with specified version,
  • it will create an instance by using extracted qcow2 image which needs to be uploaded (did not check if many times or just once),
  • it will deploy the CRC cluster,
  • on the end it will make steps to estabilish cluster

If someone is using the script for the CI, the step that the script is controlling or spawning instance is not needed.
The image can be provided by the cloud operator and what would be needed by the crc-cloud container is just simply:

  • CI is spawning an instance from the extracted qcow2 image,
  • create a podman container on the CRC node,
  • inside the new container it will start the OpenShift cluster (for example: crc-cloud --local)
  • on the end, CI will take care about the state of that VM

With that way, nobody needs to make many workarounds or take care for some leftovers after the CI will pass or fail.

NOTE: I created that issue, because the https://github.com/crc-org/crc-cloud/blob/main/pkg/bundle/setup/clustersetup.sh script does not deploy the instance properly (or maybe I'm wrong).

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): update go upgrade (go, registry.access.redhat.com/ubi9/go-toolset)

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update auto merged updates (actions/checkout, actions/setup-go, pulumi/pulumi-tls, quay.io/centos/centos)
  • chore(deps): update all dependencies (awscli, docker/build-push-action, docker/login-action, pulumi/pulumi, pulumi/pulumi-aws, pulumi/pulumi-azure-native, pulumi/pulumi-command, pulumi/pulumi-gcp, pulumi/pulumi-openstack, pulumi/pulumi-random)
  • chore(deps): update go updates (dario.cat/mergo, github.com/Microsoft/go-winio, github.com/charmbracelet/bubbles, github.com/charmbracelet/bubbletea, github.com/charmbracelet/lipgloss, github.com/cloudflare/circl, github.com/cyphar/filepath-securejoin, github.com/djherbis/times, github.com/fsnotify/fsnotify, github.com/go-git/go-git/v5, github.com/golang/glog, github.com/golang/protobuf, github.com/hashicorp/hcl, github.com/hashicorp/hcl/v2, github.com/mattn/go-isatty, github.com/mattn/go-runewidth, github.com/nxadm/tail, github.com/pelletier/go-toml/v2, github.com/pulumi/esc, github.com/pulumi/pulumi-aws/sdk/v6, github.com/pulumi/pulumi-azure-native-sdk/resources/v2, github.com/pulumi/pulumi-azure-native-sdk/storage/v2, github.com/pulumi/pulumi-azure-native-sdk/v2, github.com/pulumi/pulumi-command/sdk, github.com/pulumi/pulumi-gcp/sdk/v6, github.com/pulumi/pulumi-openstack/sdk/v3, github.com/pulumi/pulumi-random/sdk/v4, github.com/pulumi/pulumi-tls/sdk/v4, github.com/pulumi/pulumi/sdk/v3, github.com/rivo/uniseg, github.com/rogpeppe/go-internal, github.com/sagikazarmark/locafero, github.com/santhosh-tekuri/jsonschema/v5, github.com/skeema/knownhosts, github.com/spf13/afero, github.com/spf13/cast, github.com/spf13/cobra, github.com/spf13/viper, github.com/zclconf/go-cty, go.uber.org/multierr, golang.org/x/crypto, golang.org/x/mod, golang.org/x/net, golang.org/x/sync, golang.org/x/sys, golang.org/x/term, golang.org/x/text, golang.org/x/tools, google.golang.org/grpc, google.golang.org/protobuf)

Detected dependencies

dockerfile
oci/Containerfile
  • registry.access.redhat.com/ubi9/go-toolset 1.20.10-2.1699551725@sha256:310fbbc9b2a6af87d730e244d5b20a1836df3ae295c290ffec2d4ef6a53a33f8
  • quay.io/centos/centos stream9@sha256:3b68f482785306a9aa02726ed7f256cea6bd681162ca5996090e2f797fceaabb
github-actions
.github/workflows/build-and-push-image.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • docker/login-action v3.0.0@343f7c4344506bcbf9b4de18042ae17996df046d
  • docker/metadata-action v5.5.1@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
  • docker/build-push-action v5.1.0@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
.github/workflows/make-check.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-go v5.0.0@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
gomod
go.mod
  • go 1.20
  • github.com/pulumi/pulumi-aws/sdk/v6 v6.4.0
  • github.com/pulumi/pulumi-azure-native-sdk/resources/v2 v2.10.0
  • github.com/pulumi/pulumi-azure-native-sdk/storage/v2 v2.10.0
  • github.com/pulumi/pulumi-gcp/sdk/v6 v6.65.0
  • github.com/pulumi/pulumi-openstack/sdk/v3 v3.15.1
  • github.com/pulumi/pulumi-tls/sdk/v4 v4.11.0
  • github.com/pulumi/pulumi/sdk/v3 v3.103.1
  • github.com/spf13/cobra v1.7.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.17.0
  • dario.cat/mergo v1.0.0
  • github.com/agext/levenshtein v1.2.3
  • github.com/apparentlymart/go-textseg/v15 v15.0.0
  • github.com/atotto/clipboard v0.1.4
  • github.com/aymanbagabas/go-osc52/v2 v2.0.1
  • github.com/charmbracelet/bubbles v0.16.1
  • github.com/charmbracelet/bubbletea v0.24.2
  • github.com/charmbracelet/lipgloss v0.8.0
  • github.com/cloudflare/circl v1.3.7
  • github.com/cyphar/filepath-securejoin v0.2.4
  • github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da@41bb18bfe9da
  • github.com/hashicorp/hcl v1.0.0
  • github.com/hashicorp/hcl/v2 v2.18.1
  • github.com/lucasb-eyer/go-colorful v1.2.0
  • github.com/mattn/go-isatty v0.0.19
  • github.com/mattn/go-localereader v0.0.1
  • github.com/mitchellh/go-wordwrap v1.0.1
  • github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6@276c6243b2f6
  • github.com/muesli/cancelreader v0.2.2
  • github.com/muesli/reflow v0.3.0
  • github.com/muesli/termenv v0.15.2
  • github.com/pgavlin/fx v0.1.6
  • github.com/pjbgf/sha1cd v0.3.0
  • github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231@75f619a67231
  • github.com/pulumi/esc v0.6.2
  • github.com/pulumi/pulumi-azure-native-sdk/v2 v2.10.0
  • github.com/sagikazarmark/locafero v0.3.0
  • github.com/sagikazarmark/slog-shim v0.1.0
  • github.com/skeema/knownhosts v1.2.1
  • github.com/sourcegraph/conc v0.3.0
  • github.com/zclconf/go-cty v1.14.1
  • go.uber.org/multierr v1.9.0
  • golang.org/x/mod v0.14.0
  • golang.org/x/sync v0.5.0
  • golang.org/x/tools v0.16.0
  • github.com/Microsoft/go-winio v0.6.1
  • github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da@8b13a72661da
  • github.com/blang/semver v3.5.1+incompatible
  • github.com/cheggaaa/pb v1.0.29
  • github.com/djherbis/times v1.5.0
  • github.com/emirpasic/gods v1.18.1
  • github.com/fsnotify/fsnotify v1.6.0
  • github.com/go-git/go-billy/v5 v5.5.0
  • github.com/go-git/go-git/v5 v5.11.0
  • github.com/gogo/protobuf v1.3.2
  • github.com/golang/glog v1.1.2
  • github.com/golang/protobuf v1.5.3
  • github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645@8e809c8a8645
  • github.com/hashicorp/errwrap v1.1.0
  • github.com/hashicorp/go-multierror v1.1.1
  • github.com/inconshreveable/mousetrap v1.1.0
  • github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99@d14ea06fba99
  • github.com/kevinburke/ssh_config v1.2.0
  • github.com/magiconair/properties v1.8.7
  • github.com/mattn/go-runewidth v0.0.15
  • github.com/mitchellh/go-ps v1.0.0
  • github.com/mitchellh/mapstructure v1.5.0
  • github.com/nxadm/tail v1.4.8
  • github.com/opentracing/basictracer-go v1.1.0
  • github.com/opentracing/opentracing-go v1.2.0
  • github.com/pelletier/go-toml/v2 v2.1.0
  • github.com/pkg/errors v0.9.1
  • github.com/pkg/term v1.1.0
  • github.com/pulumi/pulumi-command/sdk v0.9.2
  • github.com/pulumi/pulumi-random/sdk/v4 v4.14.0
  • github.com/rivo/uniseg v0.4.4
  • github.com/rogpeppe/go-internal v1.11.0
  • github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06@525f6e181f06
  • github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
  • github.com/sergi/go-diff v1.3.1
  • github.com/spf13/afero v1.10.0
  • github.com/spf13/cast v1.5.1
  • github.com/subosito/gotenv v1.6.0
  • github.com/texttheater/golang-levenshtein v1.0.1
  • github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7@3fa38070dbd7
  • github.com/uber/jaeger-client-go v2.30.0+incompatible
  • github.com/uber/jaeger-lib v2.4.1+incompatible
  • github.com/xanzy/ssh-agent v0.3.3
  • go.uber.org/atomic v1.11.0
  • golang.org/x/crypto v0.17.0
  • golang.org/x/net v0.19.0
  • golang.org/x/sys v0.15.0
  • golang.org/x/term v0.15.0
  • golang.org/x/text v0.14.0
  • google.golang.org/grpc v1.58.2
  • google.golang.org/protobuf v1.31.0
  • gopkg.in/ini.v1 v1.67.0
  • gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7@dd632973f1e7
  • gopkg.in/warnings.v0 v0.1.2
  • gopkg.in/yaml.v3 v3.0.1
  • lukechampine.com/frand v1.4.2
pip_requirements
requirements.txt
  • awscli ==1.32.49
  • gcloud ==0.18.3
regex
oci/Containerfile
  • pulumi/pulumi v3.103.1
  • pulumi/pulumi-command v0.9.2
  • pulumi/pulumi-tls v5.0.1
  • pulumi/pulumi-random v4.15.1
  • pulumi/pulumi-aws v6.23.0
  • pulumi/pulumi-gcp v7.11.0
  • pulumi/pulumi-azure-native v2.30.0
  • pulumi/pulumi-openstack v3.15.1

Ability to provide custom security group settings

Sometimes, due to company policies, it is not recommended to use ingress rules which are open to all ips.
The goal is to be able to custom the ingress rules such that the created/used security group is following the company policies.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • fix(deps): update patch and digest updates (github.com/pulumi/pulumi-command/sdk, github.com/pulumi/pulumi-tls/sdk/v4, golang.org/x/exp, pulumi/pulumi-command, pulumi/pulumi-tls)
  • chore(deps): update all dependencies (awscli, docker/build-push-action, github.com/pulumi/pulumi-aws/sdk/v6, github.com/pulumi/pulumi-azure-native-sdk/resources/v2, github.com/pulumi/pulumi-azure-native-sdk/storage/v2, github.com/pulumi/pulumi/sdk/v3, github.com/spf13/cobra, pulumi/pulumi, pulumi/pulumi-aws, pulumi/pulumi-azure-native, registry.access.redhat.com/ubi9/go-toolset)

Detected dependencies

dockerfile
oci/Containerfile
  • registry.access.redhat.com/ubi9/go-toolset 1.19.13-4.1697647145@sha256:12d67bb6d991a18a91f3b8184ac4b711334f3c095e0e3cdcf7f9ed361ee2b710
  • quay.io/centos/centos stream9@sha256:8845d412fc1bfcd06a0f8615dcd53acf8f8895af653e40fd95625be6b24c370b
github-actions
.github/workflows/build-and-push-image.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • docker/login-action v3.0.0@343f7c4344506bcbf9b4de18042ae17996df046d
  • docker/metadata-action v5.0.0@96383f45573cb7f253c731d3b3ab81c87ef81934
  • docker/build-push-action v5.0.0@0565240e2d4ab88bba5387d719585280857ece09
.github/workflows/make-check.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-go v4.1.0@93397bea11091df50f3d7e59dc26a7711a8bcfbe
gomod
go.mod
  • github.com/pulumi/pulumi-aws/sdk/v6 v6.4.0
  • github.com/pulumi/pulumi-azure-native-sdk/resources/v2 v2.10.0
  • github.com/pulumi/pulumi-azure-native-sdk/storage/v2 v2.10.0
  • github.com/pulumi/pulumi-tls/sdk/v4 v4.11.0
  • github.com/pulumi/pulumi/sdk/v3 v3.87.0
  • github.com/spf13/cobra v1.7.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.17.0
  • github.com/pulumi/pulumi-command/sdk v0.9.1
  • github.com/pulumi/pulumi-random/sdk/v4 v4.14.0
  • golang.org/x/exp v0.0.0-20231006140011-7918f672742d@7918f672742d
pip_requirements
requirements.txt
  • awscli ==1.29.73
regex
oci/Containerfile
  • pulumi/pulumi v3.87.0
  • pulumi/pulumi-command v0.9.1
  • pulumi/pulumi-tls v4.11.0
  • pulumi/pulumi-random v4.14.0
  • pulumi/pulumi-aws v6.4.0
  • pulumi/pulumi-azure-native v2.10.0

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): update go upgrade (go, registry.access.redhat.com/ubi9/go-toolset)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • chore(deps): update auto merged updates (actions/checkout, actions/setup-go, awscli, pulumi/pulumi-openstack, pulumi/pulumi-tls, quay.io/centos/centos)
  • chore(deps): update all dependencies (docker/build-push-action, docker/login-action, pulumi/pulumi, pulumi/pulumi-aws, pulumi/pulumi-azure-native, pulumi/pulumi-command, pulumi/pulumi-gcp, pulumi/pulumi-random)
  • chore(deps): update go updates (github.com/Microsoft/go-winio, github.com/charmbracelet/bubbles, github.com/charmbracelet/bubbletea, github.com/charmbracelet/lipgloss, github.com/cloudflare/circl, github.com/cyphar/filepath-securejoin, github.com/djherbis/times, github.com/fsnotify/fsnotify, github.com/go-git/go-git/v5, github.com/golang/glog, github.com/golang/protobuf, github.com/hashicorp/hcl, github.com/hashicorp/hcl/v2, github.com/mattn/go-isatty, github.com/nxadm/tail, github.com/pelletier/go-toml/v2, github.com/pulumi/esc, github.com/pulumi/pulumi-aws/sdk/v6, github.com/pulumi/pulumi-azure-native-sdk/resources/v2, github.com/pulumi/pulumi-azure-native-sdk/storage/v2, github.com/pulumi/pulumi-azure-native-sdk/v2, github.com/pulumi/pulumi-command/sdk, github.com/pulumi/pulumi-gcp/sdk/v6, github.com/pulumi/pulumi-openstack/sdk/v3, github.com/pulumi/pulumi-random/sdk/v4, github.com/pulumi/pulumi-tls/sdk/v4, github.com/pulumi/pulumi/sdk/v3, github.com/rivo/uniseg, github.com/rogpeppe/go-internal, github.com/sagikazarmark/locafero, github.com/skeema/knownhosts, github.com/spf13/afero, github.com/spf13/cast, github.com/spf13/cobra, github.com/spf13/viper, github.com/zclconf/go-cty, go.uber.org/multierr, golang.org/x/crypto, golang.org/x/mod, golang.org/x/net, golang.org/x/sync, golang.org/x/sys, golang.org/x/term, golang.org/x/text, golang.org/x/tools, google.golang.org/grpc, google.golang.org/protobuf)
  • Click on this checkbox to rebase all open PRs at once

Detected dependencies

dockerfile
oci/Containerfile
  • registry.access.redhat.com/ubi9/go-toolset 1.20.10-2.1699551725@sha256:310fbbc9b2a6af87d730e244d5b20a1836df3ae295c290ffec2d4ef6a53a33f8
  • quay.io/centos/centos stream9@sha256:3b68f482785306a9aa02726ed7f256cea6bd681162ca5996090e2f797fceaabb
github-actions
.github/workflows/build-and-push-image.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • docker/login-action v3.0.0@343f7c4344506bcbf9b4de18042ae17996df046d
  • docker/metadata-action v5.5.1@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
  • docker/build-push-action v5.1.0@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
.github/workflows/make-check.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-go v5.0.0@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
gomod
go.mod
  • go 1.20
  • github.com/pulumi/pulumi-aws/sdk/v6 v6.4.0
  • github.com/pulumi/pulumi-azure-native-sdk/resources/v2 v2.10.0
  • github.com/pulumi/pulumi-azure-native-sdk/storage/v2 v2.10.0
  • github.com/pulumi/pulumi-gcp/sdk/v6 v6.65.0
  • github.com/pulumi/pulumi-openstack/sdk/v3 v3.15.1
  • github.com/pulumi/pulumi-tls/sdk/v4 v4.11.0
  • github.com/pulumi/pulumi/sdk/v3 v3.103.1
  • github.com/spf13/cobra v1.7.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.17.0
  • dario.cat/mergo v1.0.0
  • github.com/agext/levenshtein v1.2.3
  • github.com/apparentlymart/go-textseg/v15 v15.0.0
  • github.com/atotto/clipboard v0.1.4
  • github.com/aymanbagabas/go-osc52/v2 v2.0.1
  • github.com/charmbracelet/bubbles v0.16.1
  • github.com/charmbracelet/bubbletea v0.24.2
  • github.com/charmbracelet/lipgloss v0.8.0
  • github.com/cloudflare/circl v1.3.7
  • github.com/cyphar/filepath-securejoin v0.2.4
  • github.com/hashicorp/hcl v1.0.0
  • github.com/hashicorp/hcl/v2 v2.18.1
  • github.com/lucasb-eyer/go-colorful v1.2.0
  • github.com/mattn/go-isatty v0.0.19
  • github.com/mattn/go-localereader v0.0.1
  • github.com/mitchellh/go-wordwrap v1.0.1
  • github.com/muesli/cancelreader v0.2.2
  • github.com/muesli/reflow v0.3.0
  • github.com/muesli/termenv v0.15.2
  • github.com/pgavlin/fx v0.1.6
  • github.com/pjbgf/sha1cd v0.3.0
  • github.com/pulumi/esc v0.6.2
  • github.com/pulumi/pulumi-azure-native-sdk/v2 v2.10.0
  • github.com/sagikazarmark/locafero v0.3.0
  • github.com/sagikazarmark/slog-shim v0.1.0
  • github.com/skeema/knownhosts v1.2.1
  • github.com/sourcegraph/conc v0.3.0
  • github.com/zclconf/go-cty v1.14.1
  • go.uber.org/multierr v1.9.0
  • golang.org/x/mod v0.14.0
  • golang.org/x/sync v0.5.0
  • golang.org/x/tools v0.16.0
  • github.com/Microsoft/go-winio v0.6.1
  • github.com/blang/semver v3.5.1+incompatible
  • github.com/cheggaaa/pb v1.0.29
  • github.com/djherbis/times v1.5.0
  • github.com/emirpasic/gods v1.18.1
  • github.com/fsnotify/fsnotify v1.6.0
  • github.com/go-git/go-billy/v5 v5.5.0
  • github.com/go-git/go-git/v5 v5.11.0
  • github.com/gogo/protobuf v1.3.2
  • github.com/golang/glog v1.1.2
  • github.com/golang/protobuf v1.5.3
  • github.com/hashicorp/errwrap v1.1.0
  • github.com/hashicorp/go-multierror v1.1.1
  • github.com/inconshreveable/mousetrap v1.1.0
  • github.com/kevinburke/ssh_config v1.2.0
  • github.com/magiconair/properties v1.8.7
  • github.com/mattn/go-runewidth v0.0.15
  • github.com/mitchellh/go-ps v1.0.0
  • github.com/mitchellh/mapstructure v1.5.0
  • github.com/nxadm/tail v1.4.8
  • github.com/opentracing/basictracer-go v1.1.0
  • github.com/opentracing/opentracing-go v1.2.0
  • github.com/pelletier/go-toml/v2 v2.1.0
  • github.com/pkg/errors v0.9.1
  • github.com/pkg/term v1.1.0
  • github.com/pulumi/pulumi-command/sdk v0.9.2
  • github.com/pulumi/pulumi-random/sdk/v4 v4.14.0
  • github.com/rivo/uniseg v0.4.4
  • github.com/rogpeppe/go-internal v1.11.0
  • github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
  • github.com/sergi/go-diff v1.3.1
  • github.com/spf13/afero v1.10.0
  • github.com/spf13/cast v1.5.1
  • github.com/subosito/gotenv v1.6.0
  • github.com/texttheater/golang-levenshtein v1.0.1
  • github.com/uber/jaeger-client-go v2.30.0+incompatible
  • github.com/uber/jaeger-lib v2.4.1+incompatible
  • github.com/xanzy/ssh-agent v0.3.3
  • go.uber.org/atomic v1.11.0
  • golang.org/x/crypto v0.17.0
  • golang.org/x/net v0.19.0
  • golang.org/x/sys v0.15.0
  • golang.org/x/term v0.15.0
  • golang.org/x/text v0.14.0
  • google.golang.org/grpc v1.58.2
  • google.golang.org/protobuf v1.31.0
  • gopkg.in/ini.v1 v1.67.0
  • gopkg.in/warnings.v0 v0.1.2
  • gopkg.in/yaml.v3 v3.0.1
  • lukechampine.com/frand v1.4.2
pip_requirements
requirements.txt
  • awscli ==1.32.49
  • gcloud ==0.18.3
regex
oci/Containerfile
  • pulumi/pulumi v3.103.1
  • pulumi/pulumi-command v0.9.2
  • pulumi/pulumi-tls v5.0.1
  • pulumi/pulumi-random v4.15.1
  • pulumi/pulumi-aws v6.23.0
  • pulumi/pulumi-gcp v7.11.0
  • pulumi/pulumi-azure-native v2.30.0
  • pulumi/pulumi-openstack v3.15.1

[suggestion] logo

played around a little and came up with a logo idea for crc cloud

image removed

this is a nod to our laptop logo for crc, and the webcam-dot referring to spot.
Suggestions or comments?


The copyright for generated images is questionable and rather want we own the 'source' of the image.

Add support different providers

As of now we are only supporting the AWS provider but we do need to add support for other cloud providers

  • GCP
  • OpenStack
  • IBM
  • Azure
    ...etc.

we are going to create different issue for each cloud provide for tracking purpose.

[bug] missing tools on container image

Within lmilbaum@ce94adc then base image for the container was changed from alpine to ubi9-minimal on that change one tool was missing to be installed within the image: qemu-img, that tool is used at the importer script, also tar is required and missing.

Currently when the import operation is executed it ends up failing with:

@ updating........................................
rt_4.13.12_amd64.zst : 15.2 GiB...     /tmp/crc-cloud-2880896440: line 48: tar: command not found
@ updating....
 +  command:local:Command execExtractScript creating (546s) /tmp/crc-cloud-2880896440: line 52: qemu-img: command not found
 +  command:local:Command execExtractScript creating (546s) cp: cannot stat 'bundle/id_ecdsa_crc': No such file or directory
 +  command:local:Command execExtractScript created (546s) cp: cannot stat 'bundle/id_ecdsa_crc': No such file or directory
 +  command:local:Command execBootKeyContent creating (0s) 
 +  command:local:Command execBootKeyContent creating (0s) cat: id_ecdsa: No such file or directory
 +  command:local:Command execBootKeyContent creating (0s) error: exit status 1: running "cat id_ecdsa":
 +  command:local:Command execBootKeyContent **creating failed** error: exit status 1: running "cat id_ecdsa":
 +  pulumi:pulumi:Stack 4.13.12-eu-west-2-crcCloud-ImageImport creating (548s) error: update failed
 +  pulumi:pulumi:Stack 4.13.12-eu-west-2-crcCloud-ImageImport **creating failed** 1 error

[Spike] using terraform to provision the infrasturcture

As of now we only have bash scripts to provision the infrastructure using the different cloud provider client binaries. This spike is a place holder and see if that is bit more cleaner to do it in terraform and better for long term.

Add CI to this repo

As of now we are not sure if some PR break existing workflow and it is not possible to test end to end flow for each PR so better to have a CI job in place which take of it. I have openshift-ci in mind but if someone have better suggestion/option do put in comment.

[Bug] Idempotent execution

It is expected that the execution of crc-cloud given same set of parameters should be idempotent. On the first execution a set of resources are created, and their state is stored at the location specified bybacker-url parameter.

If the first execution is successful all resources are created and if we try to recreate them checking the state should require no update on any resource.

According to @lmilbaum recent execution this is not honored right now

TASK [Spin crc cloud] *************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Can't run container crc-cloud", "stderr": "", "stderr_lines": [], 
"stdout": "Updating (crcCloud-Create):\n
\n    
pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running \n
@ updating.....\n    
aws:ec2:SecurityGroup OpenshiftLocal-OCP  \n    
tls:index:PrivateKey OpenshiftLocal-OCP  \n    
aws:ec2:KeyPair OpenshiftLocal-OCP  \n
random:index:RandomPassword OpenshiftLocal-OCP  \n    
aws:ec2:Instance crc-ocp412  \n 
++ command:remote:CopyFile uploadClusterSetupScript creating replacement (0s) [diff: ~localPath]\n 
++ command:remote:CopyFile uploadNewPublicKey creating replacement (0s) [diff: ~localPath]\n
@ updating....\n 
++ command:remote:CopyFile uploadClusterSetupScript created replacement (1s) [diff: ~localPath]\n 
+- command:remote:CopyFile uploadClusterSetupScript replacing (0s) [diff: ~localPath]\n 
+- command:remote:CopyFile uploadClusterSetupScript replaced (0.00s) [diff: ~localPath]\n    
command:remote:Command setXRightsForClusterSetupScript  \n 
~  command:remote:Command runClusterSetupScript updating (0s) [diff: ~create]\n
@ updating............\n 
~  command:remote:Command runClusterSetupScript updating (8s) [diff: ~create]; time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n
@ updating....\n 
~  command:remote:Command runClusterSetupScript updating (9s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n
@ updating....\n 
~  command:remote:Command runClusterSetupScript updating (10s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n
@ updating....\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating RSA private key, 4096 bit long modulus (2 primes)\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ...................................................................................................................++++\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................................................................................++++\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; e is 65537 (0x010001)\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating a RSA private key\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ..........................................+++++\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................+++++\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; writing new private key to 'system:admin.key'\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; -----\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Signature ok\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; subject=O = system:masters, CN = system:admin\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Getting CA Private Key\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: failed to create configmap: configmaps \"client-ca-custom\" already exists\n 
~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: Process exited with status 1\n 
~  command:remote:Command runClusterSetupScript **updating failed** [diff: ~create]; error: Process exited with status 1\n
@ updating.................\n 
++ command:remote:CopyFile uploadNewPublicKey creating replacement (26s) [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n 
++ command:remote:CopyFile uploadNewPublicKey **creating failed** [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n    
pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running error: update failed\n    
pulumi:pulumi:Stack crc-ocp412-crcCloud-Create **failed** 1 error\n\nDiagnostics:\n  
pulumi:pulumi:Stack (crc-ocp412-crcCloud-Create):\n    
error: update failed\n\n  command:remote:Command (runClusterSetupScript):\n    
time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n    
time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n    
time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n    
Generating RSA private key, 4096 bit long modulus (2 primes)\n    ...................................................................................................................++++\n    
....................................................................................................++++\n    
e is 65537 (0x010001)\n    
Generating a RSA private key\n    
..........................................+++++\n    
....................................+++++\n    
writing new private key to 'system:admin.key'\n    
-----\n    
Signature ok\n    
subject=O = system:masters, CN = system:admin\n    
Getting CA Private Key\n    
error: failed to create configmap: configmaps \"client-ca-custom\" already exists\n    
error: Process exited with status 1\n
\n  
command:remote:CopyFile (uploadNewPublicKey):\n    
error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n
\n
Outputs:\n    
host       : \"18.169.157.66\"\n    
password   : [secret]\n    
private-key: [secret]\n    
username   : \"core\"\n
\n
Resources:\n    
+-1 replaced\n    
7 unchanged\n
\n
Duration: 30s\n
\n
error creating the cluster with aws provider: failed to run update: exit status 255\n
code: 255\n
stdout: Updating (crcCloud-Create):\n
\n    
pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running \n
@ updating.....\n    
aws:ec2:SecurityGroup OpenshiftLocal-OCP  \n    
tls:index:PrivateKey OpenshiftLocal-OCP  \n    
aws:ec2:KeyPair OpenshiftLocal-OCP  \n    
random:index:RandomPassword OpenshiftLocal-OCP  \n    
aws:ec2:Instance crc-ocp412  \n 
++ command:remote:CopyFile uploadClusterSetupScript creating replacement (0s) [diff: ~localPath]\n 
++ command:remote:CopyFile uploadNewPublicKey creating replacement (0s) [diff: ~localPath]\n
@ updating....\n 
++ command:remote:CopyFile uploadClusterSetupScript created replacement (1s) [diff: ~localPath]\n 
+- command:remote:CopyFile uploadClusterSetupScript replacing (0s) [diff: ~localPath]\n 
+- command:remote:CopyFile uploadClusterSetupScript replaced (0.00s) [diff: ~localPath]\n    
command:remote:Command setXRightsForClusterSetupScript  \n 
~  command:remote:Command runClusterSetupScript updating (0s) [diff: ~create]\n@ updating............\n ~  command:remote:Command runClusterSetupScript updating (8s) [diff: ~create]; time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n@ updating....\n ~  command:remote:Command runClusterSetupScript updating (9s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n@ updating....\n ~  command:remote:Command runClusterSetupScript updating (10s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n@ updating....\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating RSA private key, 4096 bit long modulus (2 primes)\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ...................................................................................................................++++\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................................................................................++++\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; e is 65537 (0x010001)\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating a RSA private key\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ..........................................+++++\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................+++++\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; writing new private key to 'system:admin.key'\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; -----\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Signature ok\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; subject=O = system:masters, CN = system:admin\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Getting CA Private Key\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: failed to create configmap: configmaps \"client-ca-custom\" already exists\n ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: Process exited with status 1\n ~  command:remote:Command runClusterSetupScript **updating failed** [diff: ~create]; error: Process exited with status 1\n@ updating.................\n ++ command:remote:CopyFile uploadNewPublicKey creating replacement (26s) [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n ++ command:remote:CopyFile uploadNewPublicKey **creating failed** [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running error: update failed\n    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create **failed** 1 error\n\nDiagnostics:\n  pulumi:pulumi:Stack (crc-ocp412-crcCloud-Create):\n    error: update failed\n\n  command:remote:Command (runClusterSetupScript):\n    time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n    time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n    time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"\n    Generating RSA private key, 4096 bit long modulus (2 primes)\n    ...................................................................................................................++++\n    ....................................................................................................++++\n    e is 65537 (0x010001)\n    Generating a RSA private key\n    ..........................................+++++\n    ....................................+++++\n    writing new private key to 'system:admin.key'\n    -----\n    Signature ok\n    subject=O = system:masters, CN = system:admin\n    Getting CA Private Key\n    error: failed to create configmap: configmaps \"client-ca-custom\" already exists\n    error: Process exited with status 1\n\n  command:remote:CopyFile (uploadNewPublicKey):\n    error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n\nOutputs:\n    host       : \"18.169.157.66\"\n    password   : [secret]\n    private-key: [secret]\n    username   : \"core\"\n\nResources:\n    +-1 replaced\n    7 unchanged\n\nDuration: 30s\n\n\nstderr: warning: A new version of Pulumi is available. To upgrade from version '3.54.0' to '3.60.0', visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.\n\n\n", "stdout_lines": ["Updating (crcCloud-Create):", "", "    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running ", "@ updating.....", "    aws:ec2:SecurityGroup OpenshiftLocal-OCP  ", "    tls:index:PrivateKey OpenshiftLocal-OCP  ", "    aws:ec2:KeyPair OpenshiftLocal-OCP  ", "    random:index:RandomPassword OpenshiftLocal-OCP  ", "    aws:ec2:Instance crc-ocp412  ", " ++ command:remote:CopyFile uploadClusterSetupScript creating replacement (0s) [diff: ~localPath]", " ++ command:remote:CopyFile uploadNewPublicKey creating replacement (0s) [diff: ~localPath]", "@ updating....", " ++ command:remote:CopyFile uploadClusterSetupScript created replacement (1s) [diff: ~localPath]", " +- command:remote:CopyFile uploadClusterSetupScript replacing (0s) [diff: ~localPath]", " +- command:remote:CopyFile uploadClusterSetupScript replaced (0.00s) [diff: ~localPath]", "    command:remote:Command setXRightsForClusterSetupScript  ", " ~  command:remote:Command runClusterSetupScript updating (0s) [diff: ~create]", "@ updating............", " ~  command:remote:Command runClusterSetupScript updating (8s) [diff: ~create]; time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "@ updating....", " ~  command:remote:Command runClusterSetupScript updating (9s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "@ updating....", " ~  command:remote:Command runClusterSetupScript updating (10s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "@ updating....", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating RSA private key, 4096 bit long modulus (2 primes)", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ...................................................................................................................++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................................................................................++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; e is 65537 (0x010001)", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating a RSA private key", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ..........................................+++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................+++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; writing new private key to 'system:admin.key'", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; -----", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Signature ok", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; subject=O = system:masters, CN = system:admin", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Getting CA Private Key", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: failed to create configmap: configmaps \"client-ca-custom\" already exists", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: Process exited with status 1", " ~  command:remote:Command runClusterSetupScript **updating failed** [diff: ~create]; error: Process exited with status 1", "@ updating.................", " ++ command:remote:CopyFile uploadNewPublicKey creating replacement (26s) [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", " ++ command:remote:CopyFile uploadNewPublicKey **creating failed** [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running error: update failed", "    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create **failed** 1 error", "", "Diagnostics:", "  pulumi:pulumi:Stack (crc-ocp412-crcCloud-Create):", "    error: update failed", "", "  command:remote:Command (runClusterSetupScript):", "    time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "    time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "    time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "    Generating RSA private key, 4096 bit long modulus (2 primes)", "    ...................................................................................................................++++", "    ....................................................................................................++++", "    e is 65537 (0x010001)", "    Generating a RSA private key", "    ..........................................+++++", "    ....................................+++++", "    writing new private key to 'system:admin.key'", "    -----", "    Signature ok", "    subject=O = system:masters, CN = system:admin", "    Getting CA Private Key", "    error: failed to create configmap: configmaps \"client-ca-custom\" already exists", "    error: Process exited with status 1", "", "  command:remote:CopyFile (uploadNewPublicKey):", "    error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "", "Outputs:", "    host       : \"18.169.157.66\"", "    password   : [secret]", "    private-key: [secret]", "    username   : \"core\"", "", "Resources:", "    +-1 replaced", "    7 unchanged", "", "Duration: 30s", "", "error creating the cluster with aws provider: failed to run update: exit status 255", "code: 255", "stdout: Updating (crcCloud-Create):", "", "    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running ", "@ updating.....", "    aws:ec2:SecurityGroup OpenshiftLocal-OCP  ", "    tls:index:PrivateKey OpenshiftLocal-OCP  ", "    aws:ec2:KeyPair OpenshiftLocal-OCP  ", "    random:index:RandomPassword OpenshiftLocal-OCP  ", "    aws:ec2:Instance crc-ocp412  ", " ++ command:remote:CopyFile uploadClusterSetupScript creating replacement (0s) [diff: ~localPath]", " ++ command:remote:CopyFile uploadNewPublicKey creating replacement (0s) [diff: ~localPath]", "@ updating....", " ++ command:remote:CopyFile uploadClusterSetupScript created replacement (1s) [diff: ~localPath]", " +- command:remote:CopyFile uploadClusterSetupScript replacing (0s) [diff: ~localPath]", " +- command:remote:CopyFile uploadClusterSetupScript replaced (0.00s) [diff: ~localPath]", "    command:remote:Command setXRightsForClusterSetupScript  ", " ~  command:remote:Command runClusterSetupScript updating (0s) [diff: ~create]", "@ updating............", " ~  command:remote:Command runClusterSetupScript updating (8s) [diff: ~create]; time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "@ updating....", " ~  command:remote:Command runClusterSetupScript updating (9s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "@ updating....", " ~  command:remote:Command runClusterSetupScript updating (10s) [diff: ~create]; time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "@ updating....", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating RSA private key, 4096 bit long modulus (2 primes)", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ...................................................................................................................++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................................................................................++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; e is 65537 (0x010001)", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Generating a RSA private key", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ..........................................+++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; ....................................+++++", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; writing new private key to 'system:admin.key'", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; -----", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Signature ok", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; subject=O = system:masters, CN = system:admin", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; Getting CA Private Key", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: failed to create configmap: configmaps \"client-ca-custom\" already exists", " ~  command:remote:Command runClusterSetupScript updating (11s) [diff: ~create]; error: Process exited with status 1", " ~  command:remote:Command runClusterSetupScript **updating failed** [diff: ~create]; error: Process exited with status 1", "@ updating.................", " ++ command:remote:CopyFile uploadNewPublicKey creating replacement (26s) [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", " ++ command:remote:CopyFile uploadNewPublicKey **creating failed** [diff: ~localPath]; error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create running error: update failed", "    pulumi:pulumi:Stack crc-ocp412-crcCloud-Create **failed** 1 error", "", "Diagnostics:", "  pulumi:pulumi:Stack (crc-ocp412-crcCloud-Create):", "    error: update failed", "", "  command:remote:Command (runClusterSetupScript):", "    time=\"2023-03-29T12:09:02Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "    time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "    time=\"2023-03-29T12:09:03Z\" level=warning msg=\"The input device is not a TTY. The --tty and --interactive flags might not work properly\"", "    Generating RSA private key, 4096 bit long modulus (2 primes)", "    ...................................................................................................................++++", "    ....................................................................................................++++", "    e is 65537 (0x010001)", "    Generating a RSA private key", "    ..........................................+++++", "    ....................................+++++", "    writing new private key to 'system:admin.key'", "    -----", "    Signature ok", "    subject=O = system:masters, CN = system:admin", "    Getting CA Private Key", "    error: failed to create configmap: configmaps \"client-ca-custom\" already exists", "    error: Process exited with status 1", "", "  command:remote:CopyFile (uploadNewPublicKey):", "    error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "", "Outputs:", "    host       : \"18.169.157.66\"", "    password   : [secret]", "    private-key: [secret]", "    username   : \"core\"", "", "Resources:", "    +-1 replaced", "    7 unchanged", "", "Duration: 30s", "", "", "stderr: warning: A new version of Pulumi is available. To upgrade from version '3.54.0' to '3.60.0', visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.", "", ""]}

Import fails with S3 bucket ACL error

When running import the process fails with error:

Diagnostics:
  pulumi:pulumi:Stack (ami-ocp412-crcCloud-ImageImport):
    error: update failed

  aws:s3:BucketAclV2 (crcCloudImporterTempBucketACL):
    error: 1 error occurred:
    	* error creating S3 bucket ACL for crc-cloud-6cb8925b: AccessControlListNotSupported: The bucket does not allow ACLs

Looks like AWS change the policies in April 2023: https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-s3-automatically-enable-block-public-access-disable-access-control-lists-buckets-april-2023/

Allow instance type as parameter for aws provider

Currently the instance type for the ec2 is a fixed type, this will block certain features:

  • Limit the availability to regions where type of the instance is available.
  • Fixed arch to amd64
  • Fixed capacity, maybe an user would like to run the cluster on a bigger instance

There should be a new optional param to setup the type or ec2 instance for aws provider, the current instance type can be left in case no value is passed within the new parm

[Spike] Evaluate support for ppc64le arch

There could be a potential use case for make use of crc-cloud when testing multi-arch, specially there are not much options when trying to test for P/Z archs.

This spike will try to spin the crc-cloud approach for crc on top of powerVS

[Design] How the crc cloud tool should looks like (as part of ux side)

This issue is to track the UX part of CLI so that any refactor or using different tech stack how can we achieve it and what would be the best way to do it.

Current UX

$ ./crc-cloud.sh -h

Cluster Creation :

crc-cloud.sh -C -p pull secret path [-i cloud provider] [-d developer user password] [-k kubeadmin user password] [-r redhat user password] [-a AMI ID] [-t Instance type]
where:
    -C  Cluster Creation mode
    -i  Cloud/Infra provider (optional, default: aws)
    -p  pull secret file path (download from https://console.redhat.com/openshift/create/local) 
    -d  developer user password (optional, default: developer)
    -k  kubeadmin user password (optional, default: kubeadmin)
    -r  redhat    user password (optional, default: redhat)
    -a  Image ID (Cloud provider Machine Image) from which the VM will be Instantiated (optional, default: ami-0569ce8a44f2351be)
    -t  Cloud provider Instance Type (optional, default; c6in.2xlarge)
    -h  show this help text

Cluster Teardown:

crc-cloud.sh -T [-i cloud provider] [-v run id]
    -T  Cluster Teardown mode
    -i  Cloud/Infra provider (optional, default: aws)
    -v  The Id of the run that is gonna be destroyed, corresponds with the numeric name of the folders created in workdir (optional, default: latest)
    -h  show this help text 

In the current scenario to create a cluster (assuming that image is already part of user's project/account)

./crc-cloud.sh -C -p <pull_secret_path> -i aws -a <image_id> -t <type>

Also currently everything is around aws like default image_id and instance_type so these options should be part of provider options.

I think we need to better organize our code to have something like following to have the cloud specific options be part of cloud-provider and create only have subcommand provider name.

$ crc-cloud.sh create <cloud_provider> -h
-a Image ID (default to one of aws image_id)
-t Instance Type (default to one we tested)
- ... other cloud-provider specific options

[Global options]
-p  pull secret file path (download from https://console.redhat.com/openshift/create/local) 
-d  developer user password (optional, default: developer)
-k  kubeadmin user password (optional, default: kubeadmin)

$ crc-cloud.sh delete <cloud_provider> -h
-m provider metadata directory which have info about all the created resource


$ crc-cloud.sh status 
<cloud-provider>  <Instance_NAME> <APISERVER_ACCESS> <EXTERNAL_IP>
aws                           myfirst_tet                  yes                                 35.32.123.123

status command should look into the metadata folder and get info about the cluster/provider. Also right now since we are not publicly releasing the images for cloud provider so it is safe to expect user will choose which bundle version image they want to use for their dev/test/play purpose.

Even in future we want to make image public ( which can be done for OKD) then we want to make sure we should name them as crc-<bundle_version> and have a list available in this repo readme file to let user know.

As of now I am not thinking about plugin but since we have skipe issue for terraform/plumi please update those issue with some kind of design so that we have an overview how this looks like for those enablers. If you think the bash should be entrypoint then we just add another options as plugin or deployer to specify during create/delete/status commands.

Let's collaborate on this issue around how we can move forward with it.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
oci/Containerfile
  • registry.access.redhat.com/ubi9/go-toolset 1.19.10-4@sha256:886d1c92a95d63322f6e5cd4d6dc9b0dc9a7226fd22c82e29ceb8383e3221c43
  • registry.access.redhat.com/ubi9-minimal 9.2-691@sha256:8bf03cbc3aedde6e949090290c1e336613ac423d3451b7b1bcb704f0cf8fac88
github-actions
.github/workflows/build-and-push-image.yml
  • actions/checkout v3.5.3
  • docker/login-action v2.2.0
  • docker/metadata-action v4.6.0
  • docker/build-push-action v4.1.1
.github/workflows/make-check.yml
  • actions/checkout v3.5.3
  • actions/setup-go v4.0.1
gomod
go.mod
  • github.com/pulumi/pulumi-azure-native-sdk/resources v1.103.0
  • github.com/pulumi/pulumi-azure-native-sdk/storage v1.103.0
  • github.com/pulumi/pulumi-tls/sdk/v4 v4.10.0
  • github.com/pulumi/pulumi/sdk/v3 v3.74.0
  • github.com/spf13/cobra v1.7.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.16.0
  • github.com/pulumi/pulumi-aws/sdk/v5 v5.41.0
  • github.com/pulumi/pulumi-command/sdk v0.7.2
  • github.com/pulumi/pulumi-random/sdk/v4 v4.13.2
  • golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df@97b1e661b5df
pip_requirements
requirements.txt
  • awscli ==1.27.165
regex
oci/Containerfile
  • pulumi/pulumi v3.74.0
  • pulumi/pulumi-command v0.7.2
  • pulumi/pulumi-tls v4.10.0
  • pulumi/pulumi-random v4.13.2
  • pulumi/pulumi-aws v5.41.0
  • pulumi/pulumi-azure-native v1.103.0

  • Check this box to trigger a request for Renovate to run again on this repository

[BUG] crc-cloud import operation error

When checking logs from import operation an error is shown:

Diagnostics:
  aws:s3:BucketV2 (crcCloudImporterTempBucket):
    error: deleting urn:pulumi:crcCloud-ImageImport::ami-ocp412::aws:s3/bucketV2:BucketV2::crcCloudImporterTempBucket: 1 error occurred:
    	* deleting S3 Bucket (crc-cloud-1f046f31): BucketNotEmpty: The bucket you tried to delete is not empty
    	status code: 409, request id: SDRS0W7XB2P5X6W2, host id: yR2R8dSbkFc6ghOxAkQX8A8MIRLXJm88rfZySe6YSndBCmI4b5k9ITpNlcHhy73EcAKhmiZpW0Q=

  pulumi:pulumi:Stack (ami-ocp412-crcCloud-ImageImport):
    error: update failed

Resources:
    - 9 deleted

Duration: 2s

The import operation requires to upload the disk image to S3 and from there it is being imported as an snapshot. So the operation creates an ephemeral bucket and it is expected it will delete it.

Due to a missing specific command for delete action on resource crcCloudImporterDiskUploadByCli the disk image is not being deleted from the bucket and then the bucket can not be deleted as it is not empty (this is an s3 limitation, bucket should be empty to be deleted)

Until the patch for this is in, it is recommended to login and check s3 buckets to look for a bucket name crc-cloud-####, #### is a random string and delete it to avoid extra cost on s3 space.

Include --force parameter on destroy

It could happens that during the create operation the execution is stopped (for whatever reason) if that happens the pulumi state is partially stored, and also it is marked as lock.

If we want to destroy based on the state we need to remove the lock, we can do that manually removing the content at .pulumi/locks

The idea is to add a parameter --force on destroy, to force remove the locks in case it exists and prevent destroying the resources

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update all dependencies (actions/checkout, awscli, github.com/pulumi/pulumi-command/sdk, github.com/zclconf/go-cty, golang.org/x/tools, pulumi/pulumi, pulumi/pulumi-azure-native, pulumi/pulumi-command, registry.access.redhat.com/ubi9/go-toolset)
  • chore(deps): update go major updates (github.com/hashicorp/hcl, github.com/pulumi/pulumi-aws/sdk/v5, github.com/pulumi/pulumi-azure-native-sdk, github.com/pulumi/pulumi-azure-native-sdk/resources, github.com/pulumi/pulumi-azure-native-sdk/storage)

Detected dependencies

dockerfile
oci/Containerfile
  • registry.access.redhat.com/ubi9/go-toolset 1.19.10-9.1690899882@sha256:6b2836c0baf58f601c01549b2f7ea5c4ea71102430d97c93bfcdbc4cb8aa9fa9
  • registry.access.redhat.com/ubi9-minimal 9.2-717@sha256:35c99977ee5baa359bdc80f9ccc360644d2dbccb7462ca0fd97a23170a00cfd1
github-actions
.github/workflows/build-and-push-image.yml
  • actions/checkout v3.5.3
  • docker/login-action v2.2.0
  • docker/metadata-action v4.6.0
  • docker/build-push-action v4.1.1
.github/workflows/make-check.yml
  • actions/checkout v3.5.3
  • actions/setup-go v4.1.0
gomod
go.mod
  • github.com/pulumi/pulumi-azure-native-sdk/resources v1.104.0
  • github.com/pulumi/pulumi-azure-native-sdk/storage v1.104.0
  • github.com/pulumi/pulumi-tls/sdk/v4 v4.10.0
  • github.com/pulumi/pulumi/sdk/v3 v3.78.1
  • github.com/spf13/cobra v1.7.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.16.0
  • dario.cat/mergo v1.0.0
  • github.com/agext/levenshtein v1.2.3
  • github.com/apparentlymart/go-textseg/v13 v13.0.0
  • github.com/cloudflare/circl v1.3.3
  • github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da@41bb18bfe9da
  • github.com/hashicorp/hcl v1.0.0
  • github.com/hashicorp/hcl/v2 v2.17.0
  • github.com/mitchellh/go-wordwrap v1.0.1
  • github.com/pjbgf/sha1cd v0.3.0
  • github.com/pulumi/pulumi-azure-native-sdk v1.104.0
  • github.com/skeema/knownhosts v1.2.0
  • github.com/zclconf/go-cty v1.13.2
  • golang.org/x/mod v0.12.0
  • golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846@74c255bcf846
  • google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d@b8732ec3820d
  • github.com/Microsoft/go-winio v0.6.1
  • github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95@5aa5874ade95
  • github.com/acomagu/bufpipe v1.0.4
  • github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da@8b13a72661da
  • github.com/blang/semver v3.5.1+incompatible
  • github.com/cheggaaa/pb v1.0.29
  • github.com/djherbis/times v1.5.0
  • github.com/emirpasic/gods v1.18.1
  • github.com/fsnotify/fsnotify v1.6.0
  • github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376@3a3c6141e376
  • github.com/go-git/go-billy/v5 v5.4.1
  • github.com/go-git/go-git/v5 v5.8.1
  • github.com/gogo/protobuf v1.3.2
  • github.com/golang/glog v1.1.2
  • github.com/golang/protobuf v1.5.3
  • github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645@8e809c8a8645
  • github.com/hashicorp/errwrap v1.1.0
  • github.com/hashicorp/go-multierror v1.1.1
  • github.com/inconshreveable/mousetrap v1.1.0
  • github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99@d14ea06fba99
  • github.com/kevinburke/ssh_config v1.2.0
  • github.com/magiconair/properties v1.8.7
  • github.com/mattn/go-runewidth v0.0.15
  • github.com/mitchellh/go-ps v1.0.0
  • github.com/mitchellh/mapstructure v1.5.0
  • github.com/nxadm/tail v1.4.8
  • github.com/opentracing/basictracer-go v1.1.0
  • github.com/opentracing/opentracing-go v1.2.0
  • github.com/pelletier/go-toml/v2 v2.0.9
  • github.com/pkg/errors v0.9.1
  • github.com/pkg/term v1.1.0
  • github.com/pulumi/pulumi-aws/sdk/v5 v5.42.0
  • github.com/pulumi/pulumi-command/sdk v0.8.1
  • github.com/pulumi/pulumi-random/sdk/v4 v4.13.2
  • github.com/rivo/uniseg v0.4.4
  • github.com/rogpeppe/go-internal v1.11.0
  • github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06@525f6e181f06
  • github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
  • github.com/sergi/go-diff v1.3.1
  • github.com/spf13/afero v1.9.5
  • github.com/spf13/cast v1.5.1
  • github.com/spf13/jwalterweatherman v1.1.0
  • github.com/subosito/gotenv v1.6.0
  • github.com/texttheater/golang-levenshtein v1.0.1
  • github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7@3fa38070dbd7
  • github.com/uber/jaeger-client-go v2.30.0+incompatible
  • github.com/uber/jaeger-lib v2.4.1+incompatible
  • github.com/xanzy/ssh-agent v0.3.3
  • go.uber.org/atomic v1.11.0
  • golang.org/x/crypto v0.12.0
  • golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63@d852ddb80c63
  • golang.org/x/net v0.14.0
  • golang.org/x/sys v0.11.0
  • golang.org/x/term v0.11.0
  • golang.org/x/text v0.12.0
  • google.golang.org/grpc v1.57.0
  • google.golang.org/protobuf v1.31.0
  • gopkg.in/ini.v1 v1.67.0
  • gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7@dd632973f1e7
  • gopkg.in/warnings.v0 v0.1.2
  • gopkg.in/yaml.v3 v3.0.1
  • lukechampine.com/frand v1.4.2
  • sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600@e2786a622600
pip_requirements
requirements.txt
  • awscli ==1.29.32
regex
oci/Containerfile
  • pulumi/pulumi v3.78.1
  • pulumi/pulumi-command v0.8.1
  • pulumi/pulumi-tls v4.10.0
  • pulumi/pulumi-random v4.13.2
  • pulumi/pulumi-aws v5.42.0
  • pulumi/pulumi-azure-native v2.3.0

[Architecture] Infrastructure Deployment API & Plugin development

The aim of this issue is to describe the redesign in the CRC-Cloud architecture drafted in the PR #16 in order to decouple the Infrastructure provisioning from the OpenShift initialization and setup.

AS-IS

Originally the script has been developed to deploy the OpenShift instances on AWS, so everything has been packed in a single script that did the job. Since the project started to gain interest from other folks has been started a discussion regarding the support of other cloud infrastructures and provisioning technologies.

Assumptions

  • current monolithic design do not facilitate team work
  • current programming language (Bash scripting), if not properly structured, will become very soon unmaintainable
  • there is a wide variety of IaC technologies that could be supported and more will come in the near future

Benefits

  • codebase quality and maintainability will be dramatically improved
  • multiple Infrastructure deployment technologies could be supported without impacting the project logic
  • community could provide other deployment strategies increasing the project value

Enhancements to the current implementation

  • support git repos links as modules from CLI in order to use externally hosted plugins.
  • add to the cluster_infos.json the name of the plugin that made the deployment to enable the teardown to automatically select it and avoid conflicts between the creation and the teardown.

Design

The design is vaguely inspired to Inversion of Control design pattern widely adopted in MVC frameworks where the program engine, in our case the crc-cloud.sh script, will automatically load the plugin code expecting that has been implemented respecting the API interface and calling the interface methods from the main program flow independently from the plugin logic from which it is fully decoupled. Considering that bash scripting is not an Object Oriented programming language, the compliance enforcement of the plugins to the API cannot be made at compile time, but will be done at runtime from purposely made methods defined in the API.

insfrastructure_deployer
infrastructure deployer API (macro) finite state machine (click to zoom)

API

api_load_deployer ()

Loads the selected Infrastructure Deployer Plugin. Before loading it makes several integrity checks on the plugin script:

  • Does the plugin name contain only lowercase letters and underscores?
  • Does the plugin folder contain a folder with the same name of the selected plugin?
  • Does the folder contain a file named main.sh?
  • Does the main.sh implement all the interface methods?
    • deployer_load_dependencies()
    • deployer_usage()
    • deployer_get_eip()
    • deployer_get_iip()
    • deployer_create()
    • deployer_create()
    • deployer_teardown()
  • does the other methods implemented start with _<plugin_name>_?
  • does the other methods implemented in the scripts included by main.sh start with _<plugin_name>_?

api_wait_instance_readiness ()

Checks if the created VM is ready to receive an ssh connection and starts the OpenShift instance setup

Infrastructure Deployer API

deployer_load_dependencies ()

In this method should be done all the the plugin dependency loading, this guarantees that the PLUGIN_ROOT_FOLDER has been correctly valorized and that the dependency loading is made correctly to not break the application flow.

deployer_usage()

Show the plugin description and usage, and presents the plugin specific arguments (if needed)

deployer_get_eip()

Returns the public IP address of the VM created by the plugin.

deployer_get_iip()

Returns the internal IP address of the VM created by the plugin.

deployer_create ()

This is the entry point for the infrastructure creation

deployer_teardown()

This is the entry point for the infrastructure teardown

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (config:recommended). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Using pulumi as part of infrastructure provision

As of now we only have bash scripts to provision the infrastructure using the different cloud provider client binaries. This spike is a place holder and see if that is bit more cleaner to do it in pulumi and better for long term.

[Bug] Handle permissions for output assets

Currently create operation generate two types of assets:

  • pulumi related files; files for store the state of the infrastructure resources created by crc-cloud, and to control pulumi execution. The location for these assets is specified with the parameter backerd-url. And they are required to be passed to destroy operation to let pulumi know about the resources to be destroyed.

  • instance access files; create operation will output several files to inform data required to connected to created instance: host, username, id_rsa and password. The location for these files is specified with parametr output.

The default execution mode for crc-cloud is based on a container, and typically the locations are set as mount path volumes. As depending on the tool / engine execution user for the container may change it could create issues with permissions on created files.

As an example if you run container with docker it will use user container to set permissions and then files can not be accessed from the host.

GitHub Actions workflow using OIDC is broken

platform-engineering-org/poc#93

`Diagnostics:
pulumi:pulumi:Stack (crc-ocp412-crcCloud-Create):
error: an unhandled error occurred: 1 error occurred:
* rpc error: code = Unknown desc = invocation of aws:ec2/getVpc:getVpc returned an error: unable to validate AWS credentials.
Details: no valid credential sources for found.

Please see
for more information about providing credentials.

Error: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, failed to get API token, cannot get API token, operation error ec2imds: getToken, http response error StatusCode: 400, request to EC2 IMDS failed`

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • fix(deps): update patch and digest updates (github.com/pulumi/pulumi-command/sdk, github.com/pulumi/pulumi-tls/sdk/v4, golang.org/x/exp, pulumi/pulumi-command, pulumi/pulumi-tls)
  • chore(deps): update all dependencies (awscli, docker/build-push-action, github.com/pulumi/pulumi-aws/sdk/v6, github.com/pulumi/pulumi-azure-native-sdk/resources/v2, github.com/pulumi/pulumi-azure-native-sdk/storage/v2, github.com/pulumi/pulumi/sdk/v3, github.com/spf13/cobra, pulumi/pulumi, pulumi/pulumi-aws, pulumi/pulumi-azure-native, registry.access.redhat.com/ubi9/go-toolset)

Detected dependencies

dockerfile
oci/Containerfile
  • registry.access.redhat.com/ubi9/go-toolset 1.19.13-4.1697647145@sha256:12d67bb6d991a18a91f3b8184ac4b711334f3c095e0e3cdcf7f9ed361ee2b710
  • quay.io/centos/centos stream9@sha256:8845d412fc1bfcd06a0f8615dcd53acf8f8895af653e40fd95625be6b24c370b
github-actions
.github/workflows/build-and-push-image.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • docker/login-action v3.0.0@343f7c4344506bcbf9b4de18042ae17996df046d
  • docker/metadata-action v5.0.0@96383f45573cb7f253c731d3b3ab81c87ef81934
  • docker/build-push-action v5.0.0@0565240e2d4ab88bba5387d719585280857ece09
.github/workflows/make-check.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-go v4.1.0@93397bea11091df50f3d7e59dc26a7711a8bcfbe
gomod
go.mod
  • github.com/pulumi/pulumi-aws/sdk/v6 v6.4.0
  • github.com/pulumi/pulumi-azure-native-sdk/resources/v2 v2.10.0
  • github.com/pulumi/pulumi-azure-native-sdk/storage/v2 v2.10.0
  • github.com/pulumi/pulumi-tls/sdk/v4 v4.11.0
  • github.com/pulumi/pulumi/sdk/v3 v3.87.0
  • github.com/spf13/cobra v1.7.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.17.0
  • github.com/pulumi/pulumi-command/sdk v0.9.1
  • github.com/pulumi/pulumi-random/sdk/v4 v4.14.0
  • golang.org/x/exp v0.0.0-20231006140011-7918f672742d@7918f672742d
pip_requirements
requirements.txt
  • awscli ==1.29.73
regex
oci/Containerfile
  • pulumi/pulumi v3.87.0
  • pulumi/pulumi-command v0.9.1
  • pulumi/pulumi-tls v4.11.0
  • pulumi/pulumi-random v4.14.0
  • pulumi/pulumi-aws v6.4.0
  • pulumi/pulumi-azure-native v2.10.0

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • chore(deps): update all dependencies (awscli, docker/build-push-action, github.com/pulumi/pulumi-aws/sdk/v6, github.com/pulumi/pulumi-azure-native-sdk/resources/v2, github.com/pulumi/pulumi-azure-native-sdk/storage/v2, github.com/pulumi/pulumi/sdk/v3, github.com/spf13/cobra, pulumi/pulumi, pulumi/pulumi-aws, pulumi/pulumi-azure-native, registry.access.redhat.com/ubi9/go-toolset)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
oci/Containerfile
  • registry.access.redhat.com/ubi9/go-toolset 1.19.13-4.1697647145@sha256:12d67bb6d991a18a91f3b8184ac4b711334f3c095e0e3cdcf7f9ed361ee2b710
  • quay.io/centos/centos stream9@sha256:c68569fe2075fb6372012174a7350a2bc0e90ce41a028963afc3193820061590
github-actions
.github/workflows/build-and-push-image.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • docker/login-action v3.0.0@343f7c4344506bcbf9b4de18042ae17996df046d
  • docker/metadata-action v5.0.0@96383f45573cb7f253c731d3b3ab81c87ef81934
  • docker/build-push-action v5.0.0@0565240e2d4ab88bba5387d719585280857ece09
.github/workflows/make-check.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-go v4.1.0@93397bea11091df50f3d7e59dc26a7711a8bcfbe
gomod
go.mod
  • github.com/pulumi/pulumi-aws/sdk/v6 v6.4.0
  • github.com/pulumi/pulumi-azure-native-sdk/resources/v2 v2.10.0
  • github.com/pulumi/pulumi-azure-native-sdk/storage/v2 v2.10.0
  • github.com/pulumi/pulumi-tls/sdk/v4 v4.11.0
  • github.com/pulumi/pulumi/sdk/v3 v3.87.0
  • github.com/spf13/cobra v1.7.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.17.0
  • github.com/pulumi/pulumi-command/sdk v0.9.1
  • github.com/pulumi/pulumi-random/sdk/v4 v4.14.0
  • golang.org/x/exp v0.0.0-20231006140011-7918f672742d@7918f672742d
pip_requirements
requirements.txt
  • awscli ==1.29.73
regex
oci/Containerfile
  • pulumi/pulumi v3.87.0
  • pulumi/pulumi-command v0.9.1
  • pulumi/pulumi-tls v4.11.0
  • pulumi/pulumi-random v4.14.0
  • pulumi/pulumi-aws v6.4.0
  • pulumi/pulumi-azure-native v2.10.0

Include README info on ghcr.io/crc-org/crc-cloud:latest

Due to slow pace on releasing new versions for crc-cloud some blocker issues may be solved but not proper image version will be created on quay.. to overcome this issue we can use the latest image from ghcr, need to add this as disclaimer note on README

Remove plugin installation from code

With #84 plugins are installed on building time, this allows to track the versions between the plugin and the clients, also now both can be tracked with renovate.

Now it is needed to remove the legacy code for handling the plugin installation on code during runtime.

[ERR] failed to upload the public key on the machine

[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] waiting sshd to become ready on 34.213.33.191, hang on....
[INF] swapping default key with the one just created
Warning: Permanently added '34.213.33.191' (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0664 for 'id_ecdsa_crc' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "id_ecdsa_crc": bad permissions
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
lost connection
[ERR] failed to upload the public key on the machine @ 34.213.33.191

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.