From e4a782043c6e55f0ac804441c5ef1a65326e5c8c Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Tue, 28 Feb 2023 19:07:13 +0000 Subject: [PATCH 1/5] Use dsc to install Dev Spaces Signed-off-by: Mario Loriedo --- .gitmodules | 3 --- README.md | 21 +++++++++++++++++---- devspaces | 1 - 3 files changed, 17 insertions(+), 8 deletions(-) delete mode 100644 .gitmodules delete mode 160000 devspaces diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 2a2dfdf..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "devspaces"] - path = devspaces - url = https://github.com/redhat-developer/devspaces diff --git a/README.md b/README.md index 9aa5e3a..80cc74d 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,27 @@ Pre-requisites: `oc`, `jq` and `git` should be pre-installed and you should be l ```bash # STEP 1: Install Dev Spaces next -git submodule init && git submodule update && git -C devspaces checkout devspaces-3-rhel-8 && -cd devspaces/product && ./installDevSpacesFromLatestIIB.sh --next && \ -oc patch OperatorHub cluster --type json -p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": false}]' # re-enable default catalog sources +DSC_HOME=/home/user/.dsc +TEMP_DIR="$(mktemp -d)" +DSC_VERSION="3.4.0" +DSC_ARCH="linux-x64" +DSC_TGZ="devspaces-${DSC_VERSION}-dsc-${DSC_ARCH}.tar.gz" +DSC_TGZ_URL="https://github.com/redhat-developer/devspaces-chectl/releases/download/${DSC_VERSION}-GA-dsc-assets/${DSC_TGZ}" + +cd "${TEMP_DIR}" +curl -sSLO "${DSC_TGZ_URL}" +tar -zxvf "${DSC_TGZ}" +mv dsc "${DSC_HOME}" +PATH=${PATH}:${DSC_HOME}/bin +rm "${DSC_TGZ}" +cd - + +dsc server:deploy --olm-channel=fast ``` | :ship: NOTE | |-------------------------------------------------------------------------------------------------------| -| If you want to install the **latest** stable release-in-progress (instead of the **next** CI build), you can use `./installDevSpacesFromLatestIIB.sh --latest`.| +| If you want to install the **latest** stable release-in-progress (instead of the **next** CI build), you can use `dsc server:deploy`.| ```bash # STEP 2: Day one configurations diff --git a/devspaces b/devspaces deleted file mode 160000 index b191c12..0000000 --- a/devspaces +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b191c1253b7d633c0c0d9df3e83bb6c98d993992 From f7ec2099a9f49068f3d3404a22fb9ebeaaffb618 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Tue, 28 Feb 2023 19:14:59 +0000 Subject: [PATCH 2/5] Fixup Signed-off-by: Mario Loriedo --- .devfile.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.devfile.yaml b/.devfile.yaml index 6a61cc1..d101b50 100644 --- a/.devfile.yaml +++ b/.devfile.yaml @@ -16,10 +16,7 @@ commands: component: tooling-container commandLine: | [[ "$(oc whoami)" =~ ^kube:admin$ ]] || (echo "You need to login as kubeadmin" && false) && - git submodule init && git submodule update && \ - git -C devspaces checkout devspaces-3-rhel-8 && \ - cd devspaces/product && \ - ./installDevSpacesFromLatestIIB.sh --next + dsc server:deploy --olm-channel=fast - id: 2-day1-configs exec: label: "2. Create users, change inactivity timeout and enable container build capabilities, GitHub OAuth and image puller" From 582199f81d002af32d015c24a585cf65a2dcae1c Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Tue, 28 Feb 2023 22:45:02 +0100 Subject: [PATCH 3/5] Apply @nickboldt suggestions Co-authored-by: Nick Boldt --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 80cc74d..dbde0af 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,10 @@ Pre-requisites: `oc`, `jq` and `git` should be pre-installed and you should be l # STEP 1: Install Dev Spaces next DSC_HOME=/home/user/.dsc TEMP_DIR="$(mktemp -d)" -DSC_VERSION="3.4.0" +DSC_VERSION="3.5.0" DSC_ARCH="linux-x64" DSC_TGZ="devspaces-${DSC_VERSION}-dsc-${DSC_ARCH}.tar.gz" -DSC_TGZ_URL="https://github.com/redhat-developer/devspaces-chectl/releases/download/${DSC_VERSION}-GA-dsc-assets/${DSC_TGZ}" +DSC_TGZ_URL="https://github.com/redhat-developer/devspaces-chectl/releases/download/${DSC_VERSION}-CI-dsc-assets/${DSC_TGZ}" cd "${TEMP_DIR}" curl -sSLO "${DSC_TGZ_URL}" @@ -31,12 +31,12 @@ PATH=${PATH}:${DSC_HOME}/bin rm "${DSC_TGZ}" cd - -dsc server:deploy --olm-channel=fast +dsc server:deploy --olm-channel=next ``` | :ship: NOTE | |-------------------------------------------------------------------------------------------------------| -| If you want to install the **latest** stable release-in-progress (instead of the **next** CI build), you can use `dsc server:deploy`.| +| If you want to install the **latest** stable release-in-progress (instead of the **next** CI build), you can use `dsc server:deploy --olm-channel=latest'.| ```bash # STEP 2: Day one configurations From d7052f312d59d3654f763aac423a34afaa3be461 Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Tue, 28 Feb 2023 18:12:41 -0400 Subject: [PATCH 4/5] simpler install script --- README.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index dbde0af..3385858 100644 --- a/README.md +++ b/README.md @@ -16,20 +16,15 @@ Pre-requisites: `oc`, `jq` and `git` should be pre-installed and you should be l ```bash # STEP 1: Install Dev Spaces next -DSC_HOME=/home/user/.dsc -TEMP_DIR="$(mktemp -d)" -DSC_VERSION="3.5.0" -DSC_ARCH="linux-x64" -DSC_TGZ="devspaces-${DSC_VERSION}-dsc-${DSC_ARCH}.tar.gz" -DSC_TGZ_URL="https://github.com/redhat-developer/devspaces-chectl/releases/download/${DSC_VERSION}-CI-dsc-assets/${DSC_TGZ}" - -cd "${TEMP_DIR}" -curl -sSLO "${DSC_TGZ_URL}" -tar -zxvf "${DSC_TGZ}" -mv dsc "${DSC_HOME}" -PATH=${PATH}:${DSC_HOME}/bin -rm "${DSC_TGZ}" -cd - +DSC_VERSION="3.5.0-CI"; DSC_ARCH="linux-x64" +DSC_HOME=${HOME}/.dsc; mkdir -p "${DSC_HOME}" +DSC_TGZ_URL="https://github.com/redhat-developer/devspaces-chectl/releases/download/${DSC_VERSION}-dsc-assets/devspaces-${DSC_VERSION%-*}-dsc-${DSC_ARCH}.tar.gz" +curl -sSkLo- "${DSC_TGZ_URL}" | tar -zx -C "${DSC_HOME}/" --strip-components 1 +if [[ -d ${DSC_HOME}/bin ]]; then \ + export PATH=${PATH%":${DSC_HOME}/bin"}:${DSC_HOME}/bin; echo -n "Installed: "; dsc version; \ +else \ + echo "An error occurred installing dsc $DSC_VERSION for arch $DSC_ARCH ! Check if ${DSC_TGZ_URL} is a valid file."; \ +fi dsc server:deploy --olm-channel=next ``` From b0a091d6073fe9a05ab8286fc6737db05abb4d29 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Wed, 1 Mar 2023 18:02:19 +0000 Subject: [PATCH 5/5] Fix devfile deployment command Signed-off-by: Mario Loriedo --- .devfile.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.devfile.yaml b/.devfile.yaml index d101b50..52f7b5f 100644 --- a/.devfile.yaml +++ b/.devfile.yaml @@ -8,15 +8,24 @@ components: memoryRequest: 256M memoryLimit: 1536M cpuRequest: 100m - cpuLimit: 500m + cpuLimit: 1500m commands: - id: 1-deploy-devspaces exec: label: "1. Deploy nightly build of Dev Spaces" component: tooling-container - commandLine: | + commandLine: | [[ "$(oc whoami)" =~ ^kube:admin$ ]] || (echo "You need to login as kubeadmin" && false) && - dsc server:deploy --olm-channel=fast + DSC_VERSION="3.5.0-CI"; DSC_ARCH="linux-x64" + DSC_HOME=${HOME}/.dsc; mkdir -p "${DSC_HOME}" + DSC_TGZ_URL="https://github.com/redhat-developer/devspaces-chectl/releases/download/${DSC_VERSION}-dsc-assets/devspaces-${DSC_VERSION%-*}-dsc-${DSC_ARCH}.tar.gz" + curl -sSkLo- "${DSC_TGZ_URL}" | tar -zx -C "${DSC_HOME}/" --strip-components 1 + if [[ -d ${DSC_HOME}/bin ]]; then \ + export PATH=${PATH%":${DSC_HOME}/bin"}:${DSC_HOME}/bin; echo -n "Installed: "; dsc version; \ + else \ + echo "An error occurred installing dsc $DSC_VERSION for arch $DSC_ARCH ! Check if ${DSC_TGZ_URL} is a valid file."; \ + fi + dsc server:deploy --olm-channel=next --telemetry=off - id: 2-day1-configs exec: label: "2. Create users, change inactivity timeout and enable container build capabilities, GitHub OAuth and image puller"