Attempt to fix domain support.
[snaps.git] / docs / how-to-use / InstallSnaps.rst
1 ****************
2 Installing SNAPS
3 ****************
4
5
6 Install Dependencies
7 ====================
8 A few packages need to installed onto your system, before you can install SNAPS.
9
10 Git is used to download the snaps source from the OPNFV Gerrit repository.
11
12 Python, GCC and additional libraries are required to compile and install the packages used by SNAPS.  These
13 dependencies need to be installed whether or not a virtual Python environment is used.
14
15 Note: SNAPS-OO works best under Python 2.7; however, all of the code except in snaps.openstack.provisioning.ansible
16 should work properly within a Python 3.4.4 runtime. Ansible support will not work in any Python 3.x when the Ansible
17 version is 2.3.0 or prior. No indications when this support will be added as of 5 May 2017.
18
19 CentOS 7
20 --------
21
22 ::
23
24     sudo yum -y update
25     sudo yum install -y epel-release
26     sudo yum install -y git gcc python-pip python-devel openssl-devel
27     sudo pip install --upgrade pip
28
29 Ubuntu 14.04
30 ------------
31 ::
32
33       sudo apt-get install git python2.7-dev libssl-dev python-pip
34       sudo apt-get install corkscrew (optional for SSH over an HTTP proxy)
35
36 Ubuntu 16.04
37 ------------
38 ::
39
40       sudo apt install python git python2.7-dev libssl-dev python-pip
41       sudo apt install corkscrew (optional for SSH over an HTTP proxy)
42
43 Windows Server 2012
44 -------------------
45 ::
46
47       Install Python 2.7.x
48       Install Git
49       Install Microsoft Visual C++ Compiler for Python 2.7
50
51       Cannot SSH from behind a proxy in the 'cmd' shell as corkscrew is only available for Cygwin
52       Ansible functionality is not working on windows as an exception is being thrown while importing the packages
53
54 Optional: Setup a Python virtual environment
55 --------------------------------------------
56
57 Python 2.7 (recommend leveraging a Virtual Python runtime, e.g.
58    `Virtualenv <https://virtualenv.pypa.io>`__, in your development
59    environment)
60
61 Install SNAPS dependencies
62 --------------------------
63
64 The "pip" command below needs to be executed as root, if you are not using a virtual Python environment.
65
66 ::
67
68    git clone https://gerrit.opnfv.org/gerrit/snaps
69    sudo pip install -e <path to repo>/snaps/
70    (note: on CentOS 7 and Ubuntu 14.04 you may have to try the previous command several times)
71
72 The install should now be complete and you can start using the SNAPS-OO libraries.