diff --git a/.github/workflows/blacked.yml b/.github/workflows/blacked.yml index 21355075..cac46eb9 100644 --- a/.github/workflows/blacked.yml +++ b/.github/workflows/blacked.yml @@ -4,7 +4,7 @@ jobs: format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v3.2.0 - name: Checking out Branch run: git checkout "${GITHUB_REF:11}" - name: black diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index 91ed87cf..d4f3d830 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -8,5 +8,5 @@ jobs: uses: rokroskar/workflow-run-cleanup-action@v0.3.3 env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v3.2.0 - run: docker build --no-cache . diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3600bc19..ccee15bf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v3.2.0 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/master-protection.yml b/.github/workflows/master-protection.yml index 323ed8dd..8eaa57f6 100644 --- a/.github/workflows/master-protection.yml +++ b/.github/workflows/master-protection.yml @@ -14,7 +14,7 @@ jobs: uses: rokroskar/workflow-run-cleanup-action@v0.3.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v3.2.0 - name: Check Tag run: | diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index 2ca2e2a9..9a815886 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -15,7 +15,7 @@ jobs: uses: rokroskar/workflow-run-cleanup-action@v0.3.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v3.2.0 - name: Extract branch name shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" diff --git a/.github/workflows/release_image.yml b/.github/workflows/release_image.yml index cfd83a19..1c599d09 100644 --- a/.github/workflows/release_image.yml +++ b/.github/workflows/release_image.yml @@ -11,7 +11,7 @@ jobs: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v3.2.0 - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@master with: diff --git a/Dockerfile b/Dockerfile index c6ce48ef..36b4bc5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10.8-buster +FROM python:3.11.1-buster RUN apt-get update -y RUN apt-get install -y build-essential WORKDIR /code diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index e0bde431..a40accac 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -1058,17 +1058,26 @@ def start_server_without_playbook( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, ) + unlock_ubuntu_user_script = "\npasswd -u ubuntu\n" + unlock_ubuntu_user_script = encodeutils.safe_encode( + unlock_ubuntu_user_script.encode("utf-8") + ) if additional_keys: if init_script: add_key_script = self.create_add_keys_script(keys=additional_keys) init_script = ( add_key_script + encodeutils.safe_encode("\n".encode("utf-8")) + + unlock_ubuntu_user_script + init_script ) else: - init_script = self.create_add_keys_script(keys=additional_keys) + init_script = ( + self.create_add_keys_script(keys=additional_keys) + + encodeutils.safe_encode("\n".encode("utf-8")) + + unlock_ubuntu_user_script + ) server = self.conn.create_server( name=servername, diff --git a/docker-compose.bibigrid.yml b/docker-compose.bibigrid.yml index ae19b433..14504cc0 100644 --- a/docker-compose.bibigrid.yml +++ b/docker-compose.bibigrid.yml @@ -17,7 +17,7 @@ services: client_redis: container_name: client_redis - image: redis:7.0.5 + image: redis:7.0.6 expose: - "6379" networks: diff --git a/docker-compose.dev.bibigrid.yml b/docker-compose.dev.bibigrid.yml index f60ee435..d9ac8b52 100644 --- a/docker-compose.dev.bibigrid.yml +++ b/docker-compose.dev.bibigrid.yml @@ -18,7 +18,7 @@ services: client_redis: container_name: client_redis - image: redis:7.0.5 + image: redis:7.0.6 expose: - "6379" networks: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 5a07526c..2722c90b 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -18,7 +18,7 @@ services: client_redis: container_name: client_redis - image: redis:7.0.5 + image: redis:7.0.6 expose: - "6379" networks: diff --git a/docker-compose.yml b/docker-compose.yml index 05bd84e4..d1f8b3c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: client_redis: container_name: client_redis - image: redis:7.0.5 + image: redis:7.0.6 expose: - "6379" networks: diff --git a/requirements.txt b/requirements.txt index 68d7c367..31d71bb6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ openstacksdk ==0.103.0 deprecated == 1.2.13 ansible==7.1.0 Click==8.1.3 -flake8==5.0.4 +flake8==6.0.0 paramiko==2.12.0 ruamel.yaml==0.17.21 pyvim==3.0.3 diff --git a/thrift.dockerfile b/thrift.dockerfile new file mode 100644 index 00000000..ed40921b --- /dev/null +++ b/thrift.dockerfile @@ -0,0 +1,39 @@ +FROM ubuntu:20.04 +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && apt-get install -y \ + wget \ + build-essential \ + automake \ + libtool \ + flex \ + bison \ + pkg-config \ + libboost-all-dev \ + libevent-dev \ + libdouble-conversion-dev \ + libgoogle-glog-dev \ + libgflags-dev \ + liblz4-dev \ + liblzma-dev \ + libsnappy-dev \ + zlib1g-dev \ + binutils-dev \ + libjemalloc-dev \ + libssl-dev + +RUN wget http://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz && \ + tar xzf thrift-0.11.0.tar.gz && \ + rm thrift-0.11.0.tar.gz && \ + cd thrift-0.11.0 && \ + ./configure --without-python && \ + make && \ + make install + +COPY . /app + +WORKDIR /app + +# Set the default target language to Python +ENV TARGET_LANG python + +CMD thrift -r --gen $TARGET_LANG /app/$THRIFT_FILE