Installing git and other packages inside rancheros

7,905 views
Skip to first unread message

Sidharth Chugh

unread,
Apr 22, 2015, 7:27:03 AM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
Hello,

As rancheros doesnt have any package manager , so we want git and git-flow already installed on rancheros. So where i can change files to install this stuff?

Any help is really appreciated.

Best Regards,

Sidharth Chugh

Ivan Mikushin

unread,
Apr 22, 2015, 7:47:53 AM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
Hi,

When I need something like that, I enable ubuntu-console and then install any packages I need (they get installed in the console container). 
Beware though, that any system changes, including installed packages, in the console container won't survive reboot.

Cheers
; Ivan

Sidharth Chugh

unread,
Apr 22, 2015, 7:50:20 AM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
Thankyou for your reply.

But in our company many people will use this same os and so i want it to be preinstalled and then send iso to other people and if dont survive reboot than is of no use. Is there any solution to this? May be some how change the iso?

Ivan Mikushin

unread,
Apr 22, 2015, 8:09:57 AM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
Yes, the container is ephemeral (that's the whole point of containers), but your data will persist on the disk (/home and /opt dirs). 
Ubuntu console container (http://rancherio.github.io/os/docs/system-services/) could be customized by preinstalling the necessary software and redistributing it as a new console container to your users. 

Sidharth Chugh

unread,
Apr 22, 2015, 9:39:17 AM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
Thanks for the solution. But i am looking for some light weight , i think i have to build my own.

For example i am looking the solution like boot2docker have.


In this boot2docker iso can be edited and install whatever package and make iso again.

Darren S

unread,
Apr 22, 2015, 4:25:10 PM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
I would recommend creating a custom console in RancherOS.  The console is replaceable and you can populate it with whatever you choose.  The ubuntu console is defined at https://github.com/rancherio/os-services/blob/master/u/ubuntu-console.yml and the Dockerfile is at https://github.com/rancherio/os/blob/master/scripts/extraimages/00-ubuntuconsole.  More docs for configuring services on boot are at http://rancherio.github.io/os/docs/system-services/.

What this will allow you do to is have it download a new container on start.  I know this is not exactly what you are looking for.  We are working on a builder that will be like that project you referred to.  Basically you will specify a compose file and it will build an ISO for you.

Darren

Darren S

unread,
Apr 22, 2015, 4:26:40 PM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
Also, not all containers have to be ephemeral (even the console).  Operating in this mode is not yet well tested so we haven't documented it.  If you add the label "io.rancher.os.remove=false" to the container it should not be deleted.

Darren

Julian Vassev

unread,
Apr 22, 2015, 7:08:04 PM4/22/15
to ranc...@googlegroups.com, sch...@chip.de
Hi Sidhart,

I think you can borrow CoreOS's toolbox approach (https://github.com/coreos/toolbox). Basically, I run this:
docker run -it --name toolbox -v /:/media/root --ipc=host --net=host --pid=host ubuntu 

The first thing I usually do after that is install yum install vim htop. You have access to the rancherOS' root under /media/root - so you tweak some yaml file. Just make sure not to "docker rm toolbox": this will remove all your installed packages (and worse - your .bash_history file :) ).

Next time you need to "boot into the toolbox" just start it again:
docker start -ia toolbox

Sidharth Chugh

unread,
Apr 23, 2015, 6:51:33 AM4/23/15
to ranc...@googlegroups.com, sch...@chip.de
@Ivan
@Darrem
@Julian


Thankyou for your help. I will try the stuff you guys suggested and ping you if i have any problem.

Sidharth Chugh

unread,
Apr 25, 2015, 6:44:59 PM4/25/15
to ranc...@googlegroups.com, sch...@chip.de
I tried to create system services and it works. Only problem i have that i have put this on boot so when i do vagrant up , i am keep getting message Retrying to connect as image is being download,.

Is there any way i can download the image at the time of iso build so that if i distribute vagrant box , developers dont have to wait for this image to be downloaded?


On Wednesday, 22 April 2015 13:27:03 UTC+2, Sidharth Chugh wrote:

Darren Shepherd

unread,
Apr 25, 2015, 7:07:10 PM4/25/15
to Sidharth Chugh, ranc...@googlegroups.com, sch...@chip.de
Just curious.  Would you want that packaged in the ISO or in the vagrant box?   Are you distributing a box?  You can configure a box the way you like it and then just distribute the box?

Darren
--
You received this message because you are subscribed to the Google Groups "Rancher" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rancherio+...@googlegroups.com.
To post to this group, send email to ranc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rancherio/2a6a1382-cd03-4c9b-b259-cd48e6b89a10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sidharth Chugh

unread,
Apr 25, 2015, 7:36:33 PM4/25/15
to ranc...@googlegroups.com, sch...@chip.de
@Darren

I am distributing the box to all developers so that they instantly start using it with vagrant up. I want a box as small as possible.

I have two approaches. Can you guide me what one is correct for installing packages and the box shouldnt be so big.

First Approach

I put the docker image for installing  git and other packages during iso build in bellow project


and then do /build.sh

and after that create a vagrant box which will install this iso on pre-boot and distribute to other developers


Second approach

I will downlaod latest rancher iso. Login into machine and install docker image with git and other packages and after that create a box out of it and distribute it.




On Wednesday, 22 April 2015 13:27:03 UTC+2, Sidharth Chugh wrote:

Julian Vassev

unread,
Apr 26, 2015, 4:50:40 AM4/26/15
to ranc...@googlegroups.com, sch...@chip.de
Sidhart, 
embedding what you need in the image is not very flexible.. Use the second approach but also run a docker registry/mirror locally. This make image downloads almost instantaneous on a LAN.
Then customize your userdocker to use your proxy like this in Vagrant:

  config.vm.provision "shell", inline: 'rancherctl config set user_docker.args   "[docker,-d,--registry-mirror,http://DOCKER_PROXY_ADDRESS:5000,-s,overlay,-G,docker,-H,unix:///var/run/docker.sock]"'
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages