Skip to content

Commit

Permalink
Merge pull request #97 from indigo-dc/devel
Browse files Browse the repository at this point in the history
1.1.1
  • Loading branch information
jorge-lip authored Nov 24, 2017
2 parents d123c79 + 2cd3a9d commit f7f4708
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 55 deletions.
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ udocker (1.1.1)
* Additional unit tests
* Redirect messages to stderr
* Improved parsing of quotes in the command line
- closes: #87
* Allow override of the HOME environment variable
* Allow override of libfakechroot.so at the container level
* Automatic selection of libfakechroot.so from container info
Expand All @@ -17,6 +18,8 @@ udocker (1.1.1)
* Support for TCP/IP port remap in execution modes Pn
* Fix run with basenames failing
- closes: #89
* Allow run as root flag
- closes: #91

udocker (1.1.0)

Expand Down
96 changes: 51 additions & 45 deletions doc/installation_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,63 @@ to download both the binaries and/or pull containers from repositories.

## 2. USER INSTALLATION

### 2.1. INSTALL FROM OFFICIAL INDIGO REPOSITORIES
<!--
-->
The official release of udocker is available from the INDIGO-DataCloud
repository at `http://repo.indigo-datacloud.eu/` where is made available
as a tarball to be deployed by the end user.
### 2.1. INSTALL LATEST VERSIONS DIRECTLY FROM GITHUB

The tarball installation method contains statically compiled binaries and
is built to be used across different hosts and OS distributions.
Just download and execute the udocker and the installation will be performed
automatically.

Install of udocker v1.1.0 or higher released by INDIGO-DataCloud:
This installation method contains statically compiled binaries and is built
to be used across different hosts and OS distributions.

Once you download the udocker executable from github you can move it around
between systems. Once you start it in a new system it will install the
required tools. The installation requires outbound network connectivity.

From the master branch:

```
curl http://repo.indigo-datacloud.eu/repository/indigo/2/centos7/x86_64/tgz/udocker-1.1.0.tar.gz > udocker-tarball.tgz
export UDOCKER_TARBALL=$(pwd)/udocker-tarball.tgz
tar xzvf $UDOCKER_TARBALL udocker
curl https://raw.githubusercontent.com/indigo-dc/udocker/master/udocker.py > udocker
chmod u+rx ./udocker
./udocker install
mv ./udocker $HOME # move the executable to your preferred location for binaries
```

When using the setup.py provided in the releases install with:
From the development branch:

```
mkdir /tmp/somedir
cd /tmp/somedir
curl http://repo.indigo-datacloud.eu/repository/indigo/1/centos7/x86_64/tgz/udocker-v1.X.X.tar.gz | tar xzvf -
python setup.py install --home /home/USER/bin
curl https://raw.githubusercontent.com/indigo-dc/udocker/devel/udocker.py > udocker
chmod u+rx ./udocker
./udocker install
```

### 2.2. INSTALL LATEST UDOCKER DIRECTLY FROM GITHUB

Optionally just download and execute the udocker python script from the source and the
installation will be performed automatically. The installation from source code is not
officially supported by INDIGO-DataCloud.
### 2.2. INSTALL FROM INDIGO-DATACLOUD REPOSITORIES
<!--
-->
The official release of udocker is available from the INDIGO-DataCloud
repository at `http://repo.indigo-datacloud.eu/` where is made available
as a tarball to be deployed by the end user.

This method is very flexible, once you download the udocker executable from github
you can move it around between systems. Once you start it in a new system it will
install itself. The installation requires outbound network connectivity.
This installation method contains statically compiled binaries and is built
to be used across different hosts and OS distributions. Please check the
repositories for the latest release.

From the master branch:
Install or upgrade of udocker v1.1.0 or higher released by INDIGO-DataCloud:

```
curl https://raw.githubusercontent.com/indigo-dc/udocker/master/udocker.py > udocker
chmod u+rx ./udocker
curl http://repo.indigo-datacloud.eu/repository/indigo/2/centos7/x86_64/tgz/udocker-1.1.0.tar.gz > udocker-tarball.tgz
export UDOCKER_TARBALL=$(pwd)/udocker-tarball.tgz
tar xzvf $UDOCKER_TARBALL udocker
./udocker install
mv ./udocker $HOME/bin/ # move the executable to your preferred location for binaries
```

From the development branch:
When using the setup.py provided in the release after downloading use:

```
curl https://raw.githubusercontent.com/indigo-dc/udocker/devel/udocker.py > udocker
chmod u+rx ./udocker
./udocker install
python setup.py install --home $HOME/bin/
```

### 2.3. OBTAINING THE URL OF THE LATEST TARBALL

### 2.3. OBTAINING THE URL OF THE TARBALL

The udocker installation tarball mentioned in section 2.2 can be obtained using the
following method. First download udocker. Second use udocker itself to display the
Expand All @@ -81,11 +82,16 @@ contain several URLs pointing to mirrors.
./udocker version
```

Third, pick one URL and download the tarball using tools such as curl or wget.
Then, pick one URL and download the tarball using tools such as curl or wget.
By using a previously downloaded tarball and the UDOCKER_TARBALL environment variable
as explained in section 2.2, udocker can be deployed without having to downloaded it
everytime from the official repositories. The UDOCKER_TARBALL environment variable
can also be pointed to an http or https URL.

### 2.4. FORCE INSTALLATION
### 2.4. FORCE REINSTALLATION

To force download and reinstallation of the udocker tools. Invoke udocker install with the flag `--force`:
To force download and reinstallation of the udocker tools. Invoke udocker install
with the flag `--force`:

```
./udocker install --force
Expand All @@ -101,20 +107,21 @@ systems use the tarball installation methods described above in section 2.
RPMs are provided at http://repo.indigo-datacloud.eu

```
rpm -i udocker-1.1.0-1.noarch.rpm \
udocker-preng-1.1.0-1.x86_64.rpm \
udocker-freng-1.1.0-1.x86_64.rpm
rpm -i udocker-1.1.X-1.noarch.rpm \
udocker-preng-1.1.X-1.x86_64.rpm \
udocker-freng-1.1.X-1.x86_64.rpm
```

DEBs are provided at http://repo.indigo-datacloud.eu

```
dpkg -i udocker_1.1.0-1_all.deb \
udocker-preng_1.1.0-1_amd64.deb \
udocker-freng_1.1.0-1_amd64.deb \
udocker-rceng_1.1.0-1_amd64.deb
dpkg -i udocker_1.1.X-1_all.deb \
udocker-preng_1.1.X-1_amd64.deb \
udocker-freng_1.1.X-1_amd64.deb \
udocker-rceng_1.1.X-1_amd64.deb
```
Check the INDIGO-DataCloud repository for the latest versions and supported distributions.
Replace `X` in the examples with the latest version.
Notice that the rc engine (udocker-rceng) package is only available for Ubuntu 14 and 16.

## 4. SYSTEM INSTALLATION WITH ANSIBLE AND PYTHON
Expand Down Expand Up @@ -237,4 +244,3 @@ Example of the udocker.conf syntax:
verbose_level = 5
```


2 changes: 1 addition & 1 deletion doc/udocker.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for udocker
.\" Contact [email protected] to correct errors or typos.
.\" To read this man page use: man -l udocker.1
.TH udocker 1 "3 Nov 2017" "version 1.1.0" "udocker man page"
.TH udocker 1 "3 Nov 2017" "version 1.1.1" "udocker man page"
.SH NAME
udocker \- execute Docker containers in user space without privileges
.SH SYNOPSIS
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4449,6 +4449,7 @@ def test_15__run_env_set(self, mock_local, mock_config):
ex_eng = udocker.ExecutionEngineCommon(mock_local)
ex_eng.opt["home"] = "/"
ex_eng.opt["user"] = "user"
ex_eng.opt["uid"] = "1000"
ex_eng.container_root = "/croot"
ex_eng.container_id = "2717add4-e6f6-397c-9019-74fa67be439f"
ex_eng.container_names = ['cna[]me', ]
Expand Down
5 changes: 4 additions & 1 deletion udocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,10 @@ def _run_env_set(self):
self.opt["env"].append("LOGNAME=" + self.opt["user"])
self.opt["env"].append("USERNAME=" + self.opt["user"])

self.opt["env"].append(r"PS1=%s[\\W]\$ " % self.container_id[:8])
if str(self.opt["uid"]) == "0":
self.opt["env"].append(r"PS1=%s# " % self.container_id[:8])
else:
self.opt["env"].append(r"PS1=%s\$ " % self.container_id[:8])

self.opt["env"].append("SHLVL=0")
self.opt["env"].append("container_ruser=" + Config().username())
Expand Down
16 changes: 8 additions & 8 deletions utils/build_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@ prepare_package()
/bin/mkdir -p "${PACKAGE_DIR}/udocker_dir/bin"
/bin/mkdir -p "${PACKAGE_DIR}/udocker_dir/lib"
fi

#/bin/cp -f "${S_PROOT_DIR}/proot-x86" "${PACKAGE_DIR}/udocker_dir/bin/"
#/bin/cp -f "${S_PROOT_DIR}/proot-x86_64" "${PACKAGE_DIR}/udocker_dir/bin/"
/bin/cp -f "${S_PROOT_DIR}/proot-arm" "${PACKAGE_DIR}/udocker_dir/bin/"
/bin/cp -f "${S_PROOT_DIR}/proot-arm64" "${PACKAGE_DIR}/udocker_dir/bin/"
}

addto_package_simplejson()
Expand Down Expand Up @@ -222,6 +217,11 @@ addto_package_other()

/bin/cp -f "${REPO_DIR}/ansible_install.yaml" "${PACKAGE_DIR}/"
/bin/cp -f "${REPO_DIR}/setup.py" "${PACKAGE_DIR}/"

#/bin/cp -f "${S_PROOT_DIR}/proot-x86" "${PACKAGE_DIR}/udocker_dir/bin/"
#/bin/cp -f "${S_PROOT_DIR}/proot-x86_64" "${PACKAGE_DIR}/udocker_dir/bin/"
/bin/cp -f "${S_PROOT_DIR}/proot-arm" "${PACKAGE_DIR}/udocker_dir/bin/"
/bin/cp -f "${S_PROOT_DIR}/proot-arm64" "${PACKAGE_DIR}/udocker_dir/bin/"
}

# #############################################################################
Expand Down Expand Up @@ -1131,9 +1131,6 @@ TARBALL_FILE="${BUILD_DIR}/udocker-$(udocker_version).tar.gz"

get_proot_static
prepare_package
addto_package_simplejson
addto_package_udocker
addto_package_other

# #######
# i386
Expand Down Expand Up @@ -1175,5 +1172,8 @@ ubuntu16_build_fakechroot "amd64" "${BUILD_DIR}/fakechroot-source-x86_64"
ubuntu16_build_runc "amd64" "${BUILD_DIR}/runc-source-x86_64"
#ostree_delete "amd64" "ubuntu" "16"

addto_package_simplejson
addto_package_udocker
addto_package_other
create_package_tarball

0 comments on commit f7f4708

Please sign in to comment.