From 6531d3c181fd412908a2d4ba5a1d8eeac7138e94 Mon Sep 17 00:00:00 2001 From: Danil Titarenko <77471369+danilapog@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:22:29 +0300 Subject: [PATCH 1/6] Add ubuntu2404 in ci --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7524f3..feacc14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,10 @@ on: type: boolean description: 'Ubuntu 22.04' default: true + ubuntu2404: + type: boolean + description: 'Ubuntu 24.04' + default: true concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} @@ -129,6 +133,13 @@ jobs: "os": "ubuntu2204", "distr": "generic", "box-ver": "4.3.10" + }, + { + "execute": '${{ github.event.inputs.ubuntu2404 || true }}', + "name": "Ubuntu24.04", + "os": "ubuntu-24.04", + "distr": "bento", + "box-ver": "202404.26.0" } ] }' | jq -c '{include: [.include[] | select(.execute == true)]}') From 3c407b325522aa046991b6229637b2e2f6e62895 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Tue, 8 Oct 2024 19:15:02 +0700 Subject: [PATCH 2/6] Fix the operability of the -it parameter --- install-Debian.sh | 2 +- install-RedHat.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install-Debian.sh b/install-Debian.sh index f227070..4305b25 100644 --- a/install-Debian.sh +++ b/install-Debian.sh @@ -59,7 +59,7 @@ while [ "$1" != "" ]; do done if [ -z "${INSTALLATION_TYPE}" ]; then - INSTALLATION_TYPE="WORKSPACE_ENTERPRISE"; + INSTALLATION_TYPE=${INSTALLATION_TYPE:-"WORKSPACE_ENTERPRISE"} fi if [ -z "${UPDATE}" ]; then diff --git a/install-RedHat.sh b/install-RedHat.sh index 901abb1..23a23e5 100644 --- a/install-RedHat.sh +++ b/install-RedHat.sh @@ -78,7 +78,7 @@ while [ "$1" != "" ]; do done if [ -z "${INSTALLATION_TYPE}" ]; then - INSTALLATION_TYPE="WORKSPACE_ENTERPRISE"; + INSTALLATION_TYPE=${INSTALLATION_TYPE:-"WORKSPACE_ENTERPRISE"} fi if [ -z "${UPDATE}" ]; then From 2919364778867807fba3d06cdb347df63678de69 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Wed, 9 Oct 2024 17:43:01 +0700 Subject: [PATCH 3/6] fix Bug 70732 - Fix the use of the mysql_native_password authentication plugin --- install.sh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index aef477a..a640f2c 100644 --- a/install.sh +++ b/install.sh @@ -1112,10 +1112,6 @@ install_mysql_server () { else sed -i "s/tls_version.*/tls_version = TLSv1.2/" ${BASE_DIR}/mysql/conf.d/${PRODUCT}.cnf fi - elif [ "$INSTALL_MAIL_SERVER" != "true" ] && [[ "$(awk -F. '{ printf("%d%03d%03d%03d", $1,$2,$3,$4); }' <<< $MYSQL_VERSION)" -ge "8000034000" ]]; then - if grep -q "mysql_native_password" ${BASE_DIR}/mysql/initdb/setup.sql; then - sed -i 's/mysql_native_password/caching_sha2_password/g' ${BASE_DIR}/mysql/initdb/setup.sql - fi fi docker restart ${MYSQL_SERVER_ID}; fi @@ -1132,16 +1128,12 @@ log-error = /var/log/mysql/error.log" > ${BASE_DIR}/mysql/conf.d/${PRODUCT}.cnf [[ "$(awk -F. '{ printf("%d%03d%03d%03d", $1,$2,$3,$4); }' <<< $MYSQL_VERSION)" -lt "8000000000" ]] && echo "tls_version = TLSv1.2" >> ${BASE_DIR}/mysql/conf.d/${PRODUCT}.cnf chmod 0644 ${BASE_DIR}/mysql/conf.d/${PRODUCT}.cnf fi - - if [ "$INSTALL_MAIL_SERVER" = "true" ]; then - MYSQL_AUTHENTICATION_PLUGIN="WITH mysql_native_password" - fi if ! file_exists ${BASE_DIR}/mysql/initdb/setup.sql; then - echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD'; -CREATE USER '$MYSQL_MAIL_USER'@'%' IDENTIFIED $MYSQL_AUTHENTICATION_PLUGIN BY '$MYSQL_MAIL_ROOT_PASSWORD'; -ALTER USER 'root'@'%' IDENTIFIED $MYSQL_AUTHENTICATION_PLUGIN BY '$MYSQL_ROOT_PASSWORD'; -ALTER USER 'root'@'localhost' IDENTIFIED $MYSQL_AUTHENTICATION_PLUGIN BY '$MYSQL_ROOT_PASSWORD'; + echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED WITH mysql_native_password BY '$MYSQL_PASSWORD'; +CREATE USER '$MYSQL_MAIL_USER'@'%' IDENTIFIED WITH mysql_native_password BY '$MYSQL_MAIL_ROOT_PASSWORD'; +ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '$MYSQL_ROOT_PASSWORD'; +ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$MYSQL_ROOT_PASSWORD'; GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_ROOT_USER'@'%'; GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%'; GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_MAIL_USER'@'%'; From 9e3c709381cf18d7552da81c40d1dbbc008225f3 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Wed, 9 Oct 2024 17:59:51 +0700 Subject: [PATCH 4/6] Use the default mysql_native_password authentication plugin when upgrading --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index a640f2c..4377985 100644 --- a/install.sh +++ b/install.sh @@ -1113,6 +1113,15 @@ install_mysql_server () { sed -i "s/tls_version.*/tls_version = TLSv1.2/" ${BASE_DIR}/mysql/conf.d/${PRODUCT}.cnf fi fi + + if file_exists "${BASE_DIR}/mysql/initdb/setup.sql"; then + if grep -q "caching_sha2_password" ${BASE_DIR}/mysql/initdb/setup.sql; then + sed -i 's/caching_sha2_password/mysql_native_password/g' ${BASE_DIR}/mysql/initdb/setup.sql + elif ! grep -q "mysql_native_password" ${BASE_DIR}/mysql/initdb/setup.sql; then + sed -i 's/IDENTIFIED BY/IDENTIFIED WITH mysql_native_password BY/g' ${BASE_DIR}/mysql/initdb/setup.sql + fi + fi + docker restart ${MYSQL_SERVER_ID}; fi From 88070ff1bb13b167d72e61d24224c56760cb8a3b Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Wed, 9 Oct 2024 18:26:35 +0700 Subject: [PATCH 5/6] fix Bug 70438 - Add MailServer check on Workspace update --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index 4377985..d899d14 100644 --- a/install.sh +++ b/install.sh @@ -2315,6 +2315,8 @@ start_installation () { check_vsyscall fi fi + elif [[ -z $(get_container_id "$MAIL_CONTAINER_NAME") ]]; then + INSTALL_MAIL_SERVER="false"; fi if [ "$MAKESWAP" == "true" ]; then From bbd7215018df0fbc81cbe79f7bd374c878c73582 Mon Sep 17 00:00:00 2001 From: danilapog Date: Mon, 9 Dec 2024 16:50:17 +0300 Subject: [PATCH 6/6] Remove self-hosted actions --- .github/workflows/reusable-destroy-runner.yml | 39 -------- .github/workflows/reusable-make-runner.yml | 94 ------------------- 2 files changed, 133 deletions(-) delete mode 100644 .github/workflows/reusable-destroy-runner.yml delete mode 100644 .github/workflows/reusable-make-runner.yml diff --git a/.github/workflows/reusable-destroy-runner.yml b/.github/workflows/reusable-destroy-runner.yml deleted file mode 100644 index dd0d72d..0000000 --- a/.github/workflows/reusable-destroy-runner.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Destroy Digital Ocean runners - -on: - workflow_call: - inputs: - name: - description: "Droplet name thats will be removed" - required: true - type: string - - secrets: - access-token: - description: 'A token passed from the caller workflow' - required: true - - do-access-token: - description: 'An API token to access DigitalOcean with' - required: true - -jobs: - spin-up: - name: Destroy ${{ inputs.name }} - runs-on: ubuntu-latest - - steps: - # Install Doctl - - name: Install doctl - uses: digitalocean/action-doctl@v2 - with: - token: ${{ secrets.do-access-token }} - - # Create the VM - - name: Delete vm ${{ inputs.name }} - run: doctl compute droplet delete ${{ inputs.name }} -f - - - name: Delete the runner - run: | - RUNNER_ID=$(curl -s -X GET https://api.github.com/repos/${{ github.repository }}/actions/runners -H "accept: application/json" -H "authorization: token ${{ secrets.access-token }}" | jq -er '.runners[] | select(.name == "${{ inputs.name }}").id') - curl -s -X DELETE https://api.github.com/repos/${{ github.repository }}/actions/runners/$RUNNER_ID -H "accept: application/json" -H "authorization: token ${{ secrets.access-token }}" diff --git a/.github/workflows/reusable-make-runner.yml b/.github/workflows/reusable-make-runner.yml deleted file mode 100644 index 2a2acca..0000000 --- a/.github/workflows/reusable-make-runner.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Make Digital Ocean runners - -on: - workflow_call: - inputs: - name: - description: "Droplet name that will be created" - required: true - type: string - - image: - description: "Droplet image" - required: false - default: ubuntu-22-04-x64 - type: string - - region: - description: "Droplet region" - required: false - default: fra1 - type: string - - size: - description: "Droplet size cpu/ram" - required: false - default: s-4vcpu-8gb-intel - type: string - - secrets: - access-token: - description: 'A token passed from the caller workflow' - required: true - - do-access-token: - description: 'An API token to access DigitalOcean with' - required: true - -jobs: - spin-up: - name: Make ${{ inputs.name }} - runs-on: ubuntu-latest - outputs: - instance-name: ${{ steps.get-name.outputs.name }} - - steps: - # Install Doctl - - name: Install doctl - uses: digitalocean/action-doctl@v2 - with: - token: ${{ secrets.do-access-token }} - - - name: Get instance name - id: get-name - run: echo "name=${{ inputs.name }}" >> $GITHUB_OUTPUT - - # Template for cloud-init install vagrant and virtualbox - - name: Template out file - run: | - cat << EOF > ./user-data - #!/bin/bash - - #install virtualbox latest version - apt -y update - apt -y install jq curl virtualbox - #install vagrant latest version - wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg - echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list - apt update -y - apt install vagrant -y - - useradd -m gha-runner - echo "gha-runner ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/gha-runner - export RUNNER_CFG_PAT="${{ secrets.access-token }}" - cd /home/gha-runner - curl -s https://raw.githubusercontent.com/actions/runner/main/scripts/create-latest-svc.sh | sudo -E -s -u gha-runner bash -s ${{ github.repository }} - EOF - - # Create the VM - - name: Create vm for ${{ inputs.name }} - run: doctl compute droplet create ${{ inputs.name }} --image ${{ inputs.image }} --region ${{ inputs.region }} --size ${{ inputs.size }} --wait --user-data-file ./user-data > /dev/null - - - name: Wait for VM to come online - run: | - sleep 30 - for ATTEMPT in {1..10}; - do - echo "#### Attempt $ATTEMPT ####" - if curl -s -X GET https://api.github.com/repos/${{ github.repository }}/actions/runners -H "accept: application/json" -H "authorization: token ${{ secrets.access-token }}" | jq -er '.runners[] | select(.name == "${{ inputs.name }}") | has("status")'; - then - exit 0 - fi - sleep 30 - done - exit 1