Commit aa8a9ba9 authored by garciadeblas's avatar garciadeblas
Browse files

Updated installation procedure for osmclient

parent 98a9dac4
Loading
Loading
Loading
Loading
+21 −15
Original line number Diff line number Diff line
@@ -127,8 +127,6 @@ Commands:
  wim-update                 updates a WIM account
```

TODO:: To be updated to add newest options. Meanwhile you can run `osm --help` to obtain the latest command reference.

## Enable autocompletion

You can enable autocompletion in OSM client by creating a file osm-complete.sh in the following way:
@@ -149,33 +147,41 @@ Then you can add the following to your $HOME/.bashrc file:
### Installing from git repo

```bash
# Ubuntu pre-requirements
sudo apt install python3-pip libcurl4-gnutls-dev libgnutls-dev
# Ubuntu 18.04 pre-requirements
sudo apt-get install python3-pip libcurl4-gnutls-dev
# CentOS pre-requirements
# sudo yum install python3-pip libcurl-devel gnutls-devel
sudo -H pip install python3-magic
sudo -H python3 -m pip install python-magic
# Install OSM Information model
sudo -H pip3 install git+https://osm.etsi.org/gerrit/osm/IM --upgrade
sudo -H python3 -m pip install git+https://osm.etsi.org/gerrit/osm/IM --upgrade
# Install OSM client from the git repo.
# You can install the latest client from master branch in this way:
sudo -H pip3 install git+https://osm.etsi.org/gerrit/osm/osmclient
sudo -H python3 -m pip install git+https://osm.etsi.org/gerrit/osm/osmclient
# You could also install a specific tag/version in this way
sudo -H pip3 install git+https://osm.etsi.org/gerrit/osm/osmclient@v7.0.0rc1
sudo -H python3 -m pip install git+https://osm.etsi.org/gerrit/osm/osmclient@v7.0.0rc1
```

### Installing from cloned repo (for developers)

```bash
# Ubuntu pre-requirements
sudo apt install python3-pip libcurl4-gnutls-dev libgnutls-dev
# Make sure that
# sudo yum install python-pip libcurl-devel gnutls-devel
sudo -H pip install python3-magic
# Ubuntu 18.04 pre-requirements 
sudo apt-get install python3-pip libcurl4-openssl-dev libssl-dev
# Centos pre-requirements:
# sudo yum install python3-pip libcurl-devel gnutls-devel
sudo -H python3 -m pip install python-magic
# Install OSM Information model
sudo -H pip3 install git+https://osm.etsi.org/gerrit/osm/IM --upgrade
sudo -H python3 -m pip install git+https://osm.etsi.org/gerrit/osm/IM --upgrade
# Clone the osmclient repo and install OSM client from the git repo.
git clone https://osm.etsi.org/gerrit/osm/osmclient
sudo -H pip3 install osmclient
cd osmclient
python3 -m pip install --user -e .
# logout and login so that PATH can be updated. Executable osm will be found in /home/ubuntu/.local/bin
```

To uninstall, just:

```bash
python3 -m pip uninstall osmclient
```

## Using osmclient as a library to interact with OSM