From 7c34ddc710739d29b962e4ff0985ea27f58dca85 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Tue, 10 Dec 2024 11:25:15 -0600 Subject: [PATCH] Adjusted instructions to use cf-remote and lts version/tag instead of 3.24.0-1 --- ...tallation-community-containerized.markdown | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/getting-started/installation/general-installation/installation-community-containerized.markdown b/getting-started/installation/general-installation/installation-community-containerized.markdown index 39fecdd66..944120769 100644 --- a/getting-started/installation/general-installation/installation-community-containerized.markdown +++ b/getting-started/installation/general-installation/installation-community-containerized.markdown @@ -51,13 +51,13 @@ docker run --privileged -dit --name=cfengine-server registry.access.redhat.com/u Prepare the container for **cfengine-server** ```command -docker exec cfengine-server bash -c "dnf -y update; dnf -y install procps-ng iproute" +docker exec cfengine-server bash -c "dnf -y update; dnf -y install procps-ng iproute sudo pip; pip install cf-remote" ``` Install cfengine-community package ```command -docker exec cfengine-server bash -c "dnf -y install https://cfengine-package-repos.s3.amazonaws.com/community_binaries/Community-3.24.0/agent_rhel9_x86_64/cfengine-community-3.24.0-1.el9.x86_64.rpm" +docker exec cfengine-server bash -c "cf-remote install --edition community --clients localhost" ``` Bootstrap cf-agent @@ -76,13 +76,13 @@ docker run --privileged -dit --name=cfengine-agent registry.access.redhat.com/ub Prepare the container for **cfengine-agent** ```command -docker exec cfengine-agent bash -c "dnf -y update; dnf -y install procps-ng iproute" +docker exec cfengine-agent bash -c "dnf -y update; dnf -y install procps-ng iproute sudo pip; pip install cf-remote" ``` Install cfengine-community package ```command -docker exec cfengine-agent bash -c "dnf -y install https://cfengine-package-repos.s3.amazonaws.com/community_binaries/Community-3.24.0/agent_rhel9_x86_64/cfengine-community-3.24.0-1.el9.x86_64.rpm" +docker exec cfengine-agent bash -c "cf-remote install --edition community --clients localhost" ``` ### Bootstrap cfengine-agent to the policy server container. @@ -104,11 +104,12 @@ Create a `Dockerfile` with following contents: ```Dockerfile FROM registry.access.redhat.com/ubi9-init:latest -LABEL description="This Dockerfile builds container image based on ubi9-init for cfengine-community-3.24.0.1 rpm." +LABEL description="This Dockerfile builds container image based on ubi9-init and latest LTS release of cfengine-community." RUN dnf -y update \ -&& dnf -y install bind-utils iproute procps-ng \ -&& dnf -y install https://cfengine-package-repos.s3.amazonaws.com/community_binaries/Community-3.24.0/agent_rhel9_x86_64/cfengine-community-3.24.0-1.el9.x86_64.rpm +&& dnf -y install bind-utils iproute sudo pip procps-ng \ +&& pip install cf-remote \ +&& cf-remote install --edition community --clients localhost \ HEALTHCHECK --interval=5s --timeout=15s --retries=3 \ CMD /usr/local/sbin/cf-agent --self-diagnostics || exit 1 @@ -119,7 +120,7 @@ ENTRYPOINT ["/usr/sbin/init"] Validate the Dockerfile ```command -docker build -t cfengine:3.24.0-1 -f Dockerfile . --check +docker build -t cfengine:lts -f Dockerfile . --check ``` ```output [+] Building 0.1s (3/3) FINISHED docker:default @@ -136,7 +137,7 @@ Check complete, no warnings found. Build the docker image based on above Dockerfile: ```command -docker build -t cfengine:3.24.0-1 -f Dockerfile . +docker build -t cfengine:lts -f Dockerfile . ``` Verify created image: @@ -146,7 +147,7 @@ docker image ls cfengine ``` ```output REPOSITORY TAG IMAGE ID CREATED SIZE -cfengine 3.24.0-1 About an hour ago 302MB +cfengine lts About an hour ago 302MB ``` ### Using docker compose service @@ -159,7 +160,7 @@ name: cfengine-demo services: cfengine-server: container_name: cfengine-server - image: cfengine:3.24.0-1 + image: cfengine:lts build: context: . dockerfile: Dockerfile @@ -173,7 +174,7 @@ services: - control-plane cfengine-agent: - image: cfengine:3.24.0-1 + image: cfengine:lts build: context: . dockerfile: Dockerfile