From c54b54235c106cd5ae1d37a8708d7098f5c4ffe0 Mon Sep 17 00:00:00 2001 From: greg pereira Date: Sun, 23 Jun 2024 17:35:28 -0700 Subject: [PATCH] swap user ec2 to root Signed-off-by: greg pereira --- build/ci/rhel-ansible/playbook.yaml | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/build/ci/rhel-ansible/playbook.yaml b/build/ci/rhel-ansible/playbook.yaml index a443e5f9d06b2..59c3684435ba6 100644 --- a/build/ci/rhel-ansible/playbook.yaml +++ b/build/ci/rhel-ansible/playbook.yaml @@ -24,7 +24,7 @@ - name: remove podman for clean docker install ansible.builtin.shell: | - sudo dnf -y remove \ + dnf -y remove \ docker \ docker-client \ docker-client-latest \ @@ -41,10 +41,10 @@ poll: 0 register: docker_install_result ansible.builtin.shell: | - sudo yum install -y yum-utils - sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo - sudo yum install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - sudo systemctl start docker + yum install -y yum-utils + yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo + yum install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + systemctl start docker - name: Check on downloading docker + docker tools async_status: @@ -66,10 +66,10 @@ export ARCH=$(uname -m) if [[ "$ARCH" == "arm64" ]] || [[ "$ARCH" == "aarch64" ]]; then curl -sLO https://github.com/docker/compose/releases/download/v2.28.0/docker-compose-linux-aarch64 - sudo mv /tmp/docker-compose-linux-aarch64 /usr/bin/docker-compose + mv /tmp/docker-compose-linux-aarch64 /usr/bin/docker-compose elif [[ "$ARCH" == "amd64" ]] || [[ "$ARCH" == "x86_64" ]]; then curl -sLO https://github.com/docker/compose/releases/download/v2.28.0/docker-compose-linux-x86_64 - sudo mv /tmp/docker-compose-linux-x86_64 /usr/bin/docker-compose + mv /tmp/docker-compose-linux-x86_64 /usr/bin/docker-compose fi chmod +x /usr/bin/docker-compose @@ -80,9 +80,10 @@ registry: quay.io - name: Clone Git repository + become: false ansible.builtin.git: repo: https://github.com/redhat-et/milvus.git - dest: "/home/ec2-user/milvus" + dest: "/tmp/milvus" version: "rhel9-milvus" clone: yes update: yes @@ -96,12 +97,11 @@ poll: 0 register: builder_result become: true - ansible.builtin.shell: | set -x - cd /home/ec2-user/milvus/ + cd /tmp/milvus/ ./build/builder.sh make install - ls -al /home/ec2-user/milvus/ + ls -al /tmp/milvus/ set +x - name: Check on the builder image @@ -117,12 +117,12 @@ poll: 0 register: milvus_result ansible.builtin.shell: | - cd /home/ec2-user/milvus - ls -al /home/ec2-user/milvus - mv /home/ec2-user/milvus/bin /home/ec2-user/milvus/build/docker/milvus/rhel9/ - mv /home/ec2-user/milvus/configs /home/ec2-user/milvus/build/docker/milvus/rhel9/ - mv /home/ec2-user/milvus/lib /home/ec2-user/milvus/build/docker/milvus/rhel9/ - sudo su && /home/ec2-user/milvus/build/build_image.sh make + cd /tmp/milvus + ls -al /tmp/milvus + mv /tmp/milvus/bin /tmp/milvus/build/docker/milvus/rhel9/ + mv /tmp/milvus/configs /tmp/milvus/build/docker/milvus/rhel9/ + mv /tmp/milvus/lib /tmp/milvus/build/docker/milvus/rhel9/ + /tmp/milvus/build/build_image.sh make - name: Check on the milvus image async_status: @@ -134,7 +134,7 @@ - name: log docker images ansible.builtin.shell: | - sudo su && docker images + docker images - name: DEBUG - sleep ansible.builtin.shell: |