Skip to content

Commit

Permalink
swap user ec2 to root
Browse files Browse the repository at this point in the history
Signed-off-by: greg pereira <grpereir@redhat.com>
  • Loading branch information
Gregory-Pereira committed Jun 24, 2024
1 parent 1933b15 commit c54b542
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions build/ci/rhel-ansible/playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -134,7 +134,7 @@

- name: log docker images
ansible.builtin.shell: |
sudo su && docker images
docker images
- name: DEBUG - sleep
ansible.builtin.shell: |
Expand Down

0 comments on commit c54b542

Please sign in to comment.