diff --git a/experimental/custom-image/create-custom-image.sh b/experimental/custom-image/create-custom-image.sh deleted file mode 100755 index 006a03327c39..000000000000 --- a/experimental/custom-image/create-custom-image.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash - -set -o errexit - -readonly CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -readonly ROOT_DIR=${CURRENT_DIR}/../../ -# shellcheck source=prow/scripts/lib/log.sh -source "${ROOT_DIR}/prow/scripts/lib/log.sh" -# shellcheck source=prow/scripts/lib/utils.sh -source "${ROOT_DIR}/prow/scripts/lib/utils.sh" -# shellcheck source=prow/scripts/lib/gcp.sh -source "${ROOT_DIR}/prow/scripts/lib/gcp.sh" -cleanup() { - log::info "Removing instance $VM_NAME" - gcloud compute instances delete --quiet --zone "${ZONE}" "$VM_NAME" - if [[ "$JOB_TYPE" == "presubmit" && "$testK3d" != "true" ]]; then - log::info "Removing image $IMAGE" - gcloud compute images delete "$IMAGE" - fi -} - -if [ "$CI" == "true" ]; then - gcp::authenticate \ - -c "$GOOGLE_APPLICATION_CREDENTIALS" -fi - - -RANDOM_ID=$(head -c4 /etc/machine-id'" -utils::ssh_to_vm_with_script -z "${ZONE}" -n "${VM_NAME}" -c "sudo sh -c 'echo "" > /var/lib/dbus/machine-id'" -utils::ssh_to_vm_with_script -z "${ZONE}" -n "${VM_NAME}" -c "sudo sh -c 'echo \"RateLimitInterval=30s\" > /etc/systemd/journald.conf'" -utils::ssh_to_vm_with_script -z "${ZONE}" -n "${VM_NAME}" -c "sudo sh -c 'echo \"RateLimitBurst=1500\" >> /etc/systemd/journald.conf'" -utils::send_to_vm "${ZONE}" "$VM_NAME" "$CURRENT_DIR/resources/dbus-1_system-local.conf" "/tmp/system-local.conf" -utils::ssh_to_vm_with_script -z "${ZONE}" -n "${VM_NAME}" -c "sudo sh -c 'mv /tmp/system-local.conf /etc/dbus-1/system-local.conf'" - - -if [[ $testK3d == true ]]; then - log::info "Testing k3d" - log::info "Download latest CLI released" - utils::ssh_to_vm_with_script -z "${ZONE}" -n "${VM_NAME}" -c "curl -Lo kyma.tar.gz https://github.com/kyma-project/cli/releases/latest/download/kyma_linux_x86_64.tar.gz && tar -zxvf kyma.tar.gz && chmod +x kyma" - utils::ssh_to_vm_with_script -z "${ZONE}" -n "${VM_NAME}" -c "chmod +x kyma && mkdir ./bin && mv ./kyma ./bin/kyma && sudo cp ./bin/kyma /usr/local/bin/kyma" - log::info "Starting k3d instance" - utils::ssh_to_vm_with_script -z "${ZONE}" -n "${VM_NAME}" -c "sudo kyma provision k3d --ci" -fi - -log::info "Stopping $VM_NAME in zone ${ZONE} ..." -gcloud compute instances stop --zone="${ZONE}" "$VM_NAME" - -if [ "$JOB_TYPE" == "presubmit" ]; then - IMAGE="$VM_NAME" -else - IMAGE="kyma-deps-image-${DATE}-${PULL_BASE_SHA::6}" -fi - -if [[ $testK3d != true ]]; then - log::info "Creating the new image $IMAGE..." - gcloud compute images create "$IMAGE" \ - --source-disk "$VM_NAME" \ - --source-disk-zone "${ZONE}" \ - "${LABELS[@]}" \ - --family "custom-images" -fi diff --git a/experimental/custom-image/install-deps-debian.sh b/experimental/custom-image/install-deps-debian.sh deleted file mode 100755 index 2b21a4b9f9a8..000000000000 --- a/experimental/custom-image/install-deps-debian.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash - -### -# Following script installs necessary tooling for Debian to deploy Kyma on k3d. -# -# REQUIREMENTS: -# 64-bit version of one of these Debian versions: -# -# - Stretch 9 (stable) -# - Jessie 8 (LTS) -# -### - -set -o errexit -set -o pipefail - -MINIKUBE_VERSION=v1.28.0 -KUBECTL_CLI_VERSION=v1.27.7 -CRICTL_VERSION=v1.12.0 -HELM_VERSION="v3.7.2" -DOCKER_VERSION=5:20.10.21~3-0~debian-bullseye -NODEJS_VERSION="14.x" -K3D_VERSION="5.0.1" -PG_MIGRATE_VERSION=v4.15.1 -GO_VERSION=1.19.4 - -# install docker -sudo apt-get update -sudo apt-get upgrade -y -sudo apt-get install -y \ - apt-transport-https \ - ca-certificates \ - curl \ - gnupg2 \ - socat \ - lsb-release \ - wget \ - build-essential \ - conntrack \ - software-properties-common \ - postgresql-client-13 \ - pkg-config \ - libgit2-dev - -curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg - -echo \ - "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ - $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - -sudo apt update -sudo apt-cache policy docker-ce -sudo apt install -y docker-ce=${DOCKER_VERSION} - -# install kubectl -curl -Lo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_CLI_VERSION}/bin/linux/amd64/kubectl && \ - chmod +x /tmp/kubectl && \ - sudo mv /tmp/kubectl /usr/local/bin/kubectl - -# install helm -wget https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /tmp/helm && \ - chmod +x /tmp/helm && \ - sudo mv /tmp/helm /usr/local/bin/helm && \ - rm -rf helm-${HELM_VERSION}-linux-amd64.tar.gz linux-amd64 - -# install minikube -curl -Lo /tmp/minikube https://storage.googleapis.com/minikube/releases/${MINIKUBE_VERSION}/minikube-linux-amd64 && \ -chmod +x /tmp/minikube && \ -sudo install /tmp/minikube /usr/local/bin/minikube - - -# install postgres and migrate tool -wget https://github.com/golang-migrate/migrate/releases/download/${PG_MIGRATE_VERSION}/migrate.linux-amd64.tar.gz -O - | tar -zxO migrate > /tmp/migrate && \ - chmod +x /tmp/migrate && \ - sudo mv /tmp/migrate /usr/local/bin/migrate - - -# install circtl -wget https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz -sudo tar zxvf crictl-${CRICTL_VERSION}-linux-amd64.tar.gz -C /usr/local/bin -rm -f crictl-${CRICTL_VERSION}-linux-amd64.tar.gz - -# install jq and nodejs -curl -sL https://deb.nodesource.com/setup_${NODEJS_VERSION} | sudo bash - -sudo apt-get -y install \ - jq \ - nodejs - -# install k3d -wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=v${K3D_VERSION} bash - -# install cloud-ops agent -# https://cloud.google.com/logging/docs/agent/installation -curl -sSO https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh -sudo bash add-google-cloud-ops-agent-repo.sh \ - --also-install \ - --version=2.*.* - -# install go -sudo mkdir /usr/local/go && \ - curl -fsSL -o /tmp/go.tar.gz "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" && \ - sudo tar xzf /tmp/go.tar.gz -C /usr/local && \ - rm /tmp/go.tar.gz -# shellcheck disable=SC2016 -echo 'export PATH="$PATH:/usr/local/go/bin"' | sudo tee -a /etc/profile - -# pre-fetch-docker-images -sudo docker pull eu.gcr.io/kyma-project/external/cypress/included:8.7.0 -sudo docker pull eu.gcr.io/kyma-project/test-infra/docker-registry-2:20200202 - -sudo sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT="\)\(.*\)\("\)/\1\2 systemd.legacy_systemd_cgroup_controller=false systemd.unified_cgroup_hierarchy=false\3/' /etc/default/grub -sudo sed -i 's/\(GRUB_CMDLINE_LINUX="\)\(.*\)\("\)/\1\2 systemd.legacy_systemd_cgroup_controller=false systemd.unified_cgroup_hierarchy=false\3/' /etc/default/grub -sudo update-grub diff --git a/experimental/custom-image/machine-id-clean-up.sh b/experimental/custom-image/machine-id-clean-up.sh deleted file mode 100644 index ff5f325f92d3..000000000000 --- a/experimental/custom-image/machine-id-clean-up.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sudo sh -c 'echo "" > /etc/machine-id' -sudo sh -c 'echo "" > /var/lib/dbus/machine-id' diff --git a/experimental/custom-image/resources/dbus-1_system-local.conf b/experimental/custom-image/resources/dbus-1_system-local.conf deleted file mode 100644 index 44049a6f80be..000000000000 --- a/experimental/custom-image/resources/dbus-1_system-local.conf +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - -