Skip to content
Snippets Groups Projects
Commit db69f440 authored by Martin Bergemann's avatar Martin Bergemann :speech_balloon:
Browse files

Update README

parent 7340e3af
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,22 @@ The following software/packages need to be installed on your system:
- sshpass
- libselinux-python3 (on CentOS systems only)
## Option 2: Creating a local installation of ansible (without root access)
If ansible is not available on your system you can install it via the `install_ansible` command:
## Option 2: Installing ansible to a already existing anaconda environment:
If you are running an anaconda environment you can simply install anaconda into an existing conda environment:
```bash
conda install -c conda-forge ansible
```
or create a new conda environment:
```bash
conda create -c conda-forge -n freva-deployment -c conda-forge pip conda ansible
```
## Option 3: Creating a local installation of ansible (without root access)
If ansible is not available on your system and/or you don't have sufficient rights to install it you can install it
you can still install it via the `install_ansible` command:
```bash
python install_ansible --help
......@@ -47,7 +61,7 @@ python install_ansible; source ./ansible/bin/activate
```
instead of sourcing the environment you can also use conda actvate: `conda actviate ./ansible`; if you have conda installed.
This command installs ansible and all required python packages.
This command installs ansible and all required python packages.
> **_Note:_** On *CentOS* python SELinux libraries need to be installed. If you choose to install ansible via the `install_ansible` you'll have to use `conda` to install libselinux for your CentOS version. For example : `conda install -c conda-forge libselinux-cos7-x86_64`
## Installing docker and sudo access to the service servers
......
......@@ -74,7 +74,6 @@ class Installer:
urllib.request.urlretrieve(CONDA_URL.format(arch=self.arch),
filename=str(conda_script),
reporthook=reporthook)
self.check_hash(conda_script)
conda_script.touch(0o755)
cmd = f"{self.shell} {conda_script} -p {tmp_env} -b -f -u"
logger.info(f'Installing miniconda:\n\t{cmd}')
......@@ -101,21 +100,6 @@ class Installer:
logger.info(f'Creating conda environment:\n\t {cmd}')
self.run_cmd(cmd)
def check_hash(self, filename):
url="https://repo.anaconda.com/miniconda"
archive = urllib.request.urlopen(url).read().decode()
md5sum = ''
for line in archive.split('</tr>'):
if CONDA_VERSION.format(arch=self.arch) in line:
md5sum = line.split('<td>')[-1].strip().strip('</td>')
md5_hash = hashlib.md5()
with filename.open('rb') as f:
for byte_block in iter(lambda: f.read(4096),b""):
md5_hash.update(byte_block)
if md5_hash.hexdigest() != md5sum:
raise ValueError('Download failed, md5sum mismatch: {md5sum} ')
def pip_install(self, *pkgs):
"""Install additional packages using pip."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment