Installing CFEngine in an "ubuntu" Docker container -- Ubuntu Xenial repository misconfiguration on cfengine.com?

80 views
Skip to first unread message

Aleksey Tsalolikhin

unread,
Nov 11, 2016, 10:52:31 AM11/11/16
to help-cfengine
Hello,

I'm trying to setup GitLab CI to test CFE policies, so I'm working on automating the install of CFEngine inside Docker container created by GitLab CI.

First I tried Brian Bennett's https://hub.docker.com/r/bahamat/cfengine/ but it didn't work for me (I'm brand new to Docker, mind you, so maybe I did something wrong but there is a comment there from Chris that it doesn't work on the latest ubuntu).

Then I looked at Eystein's https://github.com/estenberg/cfe-docker#building-the-container-image and added the following commands which run inside the Docker container as root:

#!/bin/sh -xapt-get -qq update# add support for https apt sourcesapt-get -y install apt-transport-https ca-certificatesapt-get -y install wget lsb-release unzip# install latest CFEnginewget -qO- http://cfengine.com/pub/gpg.key | apt-key add -echo "deb http://cfengine.com/pub/apt $(lsb_release -cs) main" > /etc/apt/sources.list.d/cfengine-community.listapt-get updateapt-get -y install cfengine-community

That last command dies with an error that looks like repository misconfiguration on the CFEngine side:

Reading package lists...
W: The repository 'http://cfengine.com/pub/apt xenial Release' does not have a Release file.
E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package cfengine-community

So... I had a look at cfengineers.net but they just link to the CFEngine Download page, so I tried this and it worked!

So I'm all set.  :)  But the CFEngine repo is broken?
Best,
Aleksey

-- 
Need training on CFEngine, Git or Time Management?  Email trai...@verticalsysadmin.com.

Nick Anderson

unread,
Nov 11, 2016, 12:21:55 PM11/11/16
to Aleksey Tsalolikhin, help-cfengine

Aleksey Tsalolikhin writes:

> Then I looked at Eystein's
> https://github.com/estenberg/cfe-docker#building-the-container-image and
> added the following commands which run inside the Docker container as root:
>
> #!/bin/sh -xapt-get -qq update# add support for https apt
> sourcesapt-get -y install apt-transport-https ca-certificatesapt-get
> -y install wget lsb-release unzip# install latest CFEnginewget -qO-
> http://cfengine.com/pub/gpg.key | apt-key add -echo "deb

> http://cfengine.com/pub/apt $(lsbrelease -cs) main" >


> /etc/apt/sources.list.d/cfengine-community.listapt-get updateapt-get
> -y install cfengine-community
>
>
> That last command dies with an error that looks like repository
> misconfiguration on the CFEngine side:

Our repositories don't have the knowledge of specific releases, so you
should be able to replace $(lsb_release -cs) with stable and it
should work.

Please find repository instructions here.


Nick Anderson
Doer of things @ CFEngine
https://cfengine.com/
email:nick.a...@cfengine.com

Aleksey Tsalolikhin

unread,
Nov 11, 2016, 2:06:22 PM11/11/16
to Nick Anderson, help-cfengine
Thanks, Nick!  The linked instructions worked like a charm!

-- 
Need training on CFEngine, Git or Time Management?  Email trai...@verticalsysadmin.com.

Reply all
Reply to author
Forward
0 new messages