Installation using a lxc container

From TASTE
Revision as of 15:00, 28 July 2020 by Mperrotin (talk | contribs)
Jump to: navigation, search

Introduction

This chapter gives the steps to create an lxc container from a Debian buster installation, and install TASTE inside.

Install and configure LXC

You can skip this part if you are already familiar with LXC containers.

$ apt install lxc dnsmasq-base

Then setup the network: edit /etc/lxc/default.conf and replace everything with the following

lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx

Then edit or create /etc/default/lxc-net and put only the following line inside:

USE_LXC_BRIDGE = "true"

Once this is done, type:

$ systemctl restart lxc-net

After that, if you run the command:

$ ip a

you should see in the list an interface named "lxcbr0" with an ip address.

Create a new container

as sudo:

$ lxc-create -t download -n taste

select a linux distribution: debian buster amd64 Alternatively you could have built it directly:

$ lxc-create -t debian -n hello

You can then run the container:

$ lxc-run -n taste

If you later want to stop it and destroy it:

$ lxc-stop -n taste
$ lxc-destroy -n taste

Enter the container and install TASTE

To enter the running container type the following:

$ lxc-attach -n taste


this is a bare debian installation, missing nearly everything. Before installing TASTE, you must install git and sudo:

$ apt install git sudo

You must also replace dash with regular bash in Debian:

$ cd /bin ; sudo rm sh ; sudo ln -s bash sh ; cd -

Then clone TASTE repos

$ git clone https://gitrepos.estec.esa.int/taste/taste-setup tool-src
$ cd tool-src

VERY IMPORTANT AT THIS POINT: CHOOSE THE BRANCH FOR TASTE - DON'T REMAIN IN MASTER

The current version of taste for Debian is "feature_buster"

$ git checkout feature_buster
$ ./Update-TASTE.sh

It will take a few minutes to complete the installation of all dependencies and TASTE tools in the container.

After that, one last thing to do is add all the PATH updates, by adding the following line into the ~/.bashrc file:

source ~/.bashrc.taste

Voilà ! After that TASTE is installed.

Except that... only the command line tools will work.

In order to use the GUIs you must install an X forwarding server.

More precisely you must install the x2go server inside the container and x2go client in the host machine. Configure the x2go client to run a terminal session. This way you can work with TASTE from any distant machine.