From: Adam Israel Date: Wed, 21 Jun 2017 18:08:06 +0000 (-0400) Subject: Snap packaging X-Git-Tag: v2.0.2~1^2~1^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F1956%2F1;p=osm%2Fosmclient.git Snap packaging This commit introduces snap packaging for osmclient. Snaps are a fancy zip file containing an application and all of its dependencies, and a description of how it should run safely on a user's system. This is a multi-distribution alternative to installing from source, or debian package. Snaps are designed to be secure, sandboxed, containerised applications isolated from the underlying system and from other applications. Snaps allow the safe installation of apps from any vendor on mission critical devices and desktops. Updates are done atomically, rolling back automatically in the case of failure, with support for release channel and series. More info on snaps can be found here: https://snapcraft.io/ Signed-off-by: Adam Israel --- diff --git a/.gitignore b/.gitignore index 0584915..c4c79e8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,10 @@ dist/ *.gz *egg-info/ .eggs +parts/ +prime/ +stage/ +*.snap *venv/ *venv3/ .tox/ diff --git a/README.md b/README.md index b742339..43e838d 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,23 @@ A python client for osm orchestration # Installation -## Install dependencies +## python-osmclient +### Install dependencies ```bash -sudo apt-get install python-dev libcurl4-gnutls-dev python-pip libgnutls-dev python-prettytable   +sudo apt-get install python-dev libcurl4-gnutls-dev python-pip libgnutls-dev python-prettytable   sudo pip install pycurl ``` -## Install python-osmclient +### Install python-osmclient sudo pip install git+https://github.com/mfmarche/python-osmclient + +## Snap +```bash +apt install snapd +snap install osmclient --channel=beta +``` + # Setup Set the OSM_HOSTNAME variable to the host of the osm server. @@ -21,7 +29,7 @@ Example localhost$ export OSM_HOSTNAME=:8008 ``` -# Examples +# Examples ## upload vnfd ```bash @@ -72,6 +80,5 @@ localhost$ osm ns-list # Bash Completion python-osmclient uses [click](http://click.pocoo.org/5/). You can setup bash completion by putting this in your .bashrc: - - eval "$(_OSM_COMPLETE=source osm)" + eval "$(_OSM_COMPLETE=source osm)" diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..b7d0f05 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,20 @@ +name: osmclient # you probably want to 'snapcraft register ' +version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' +summary: A python client for osm orchestration +description: | + A python client for osm orchestration + +grade: stable # must be 'stable' to release into candidate/stable channels +confinement: strict # use 'strict' once you have the right plugs and slots + +apps: + osmclient: + command: bin/osm + +parts: + osmclient: + source: . + plugin: python + python-version: python2 + stage: + - -README.md