You are on page 1of 9

Cisco Software Manager Server 4.

0
Installation Guide for Docker Hosts
Table of Content

TABLE OF CONTENT ........................................................................................................................................ 2


INTRODUCTION .............................................................................................................................................. 3
PREREQUISITES .............................................................................................................................................. 3
SYSTEM REQUIREMENTS ........................................................................................................................................... 3
SYSTEMD ............................................................................................................................................................... 3
DOCKER ................................................................................................................................................................. 4
Docker Proxy Configuration ........................................................................................................................... 4
Verify the Docker configuration ..................................................................................................................... 5
DOCKER PROXY CONFIGURATION................................................................................................................................ 5
CSM SERVER INSTALLATION ........................................................................................................................... 6
CONFIGURATION FOR HOST SERVERS BEHIND CORPORATE PROXY ....................................................................................... 6
RUNNING THE INSTALLATION SCRIPT ............................................................................................................................ 7
OPEN CSM SERVER PAGE ......................................................................................................................................... 8
REMOVING CSM SERVER ................................................................................................................................ 9
Introduction
This guide provides step-by-step installation procedure for Cisco Software Manager (CSM)
Server Version 4.0.

The CSM Server 4.0 architecture is based on Docker containers which gives an easy and fast
upgrade path to the latest releases.

Please note this installation guide is not applicable to any CSM versions prior 4.0.

Prerequisites

System Requirements

The host operating system requires SystemD Linux distribution with Docker installed.
The minimum hardware requirements:
• 2 CPUs
• 8 GB RAM
• 30 GB HDD

For the larger network it is recommended to increase the number of vCPUs to be able to run
more network installation operations at the same time effectively. Also, the hard disk space
may be adjusted to store images and packages and logs from the operations.

SystemD

The installation procedure requires root privileges as it stores the configuration in


/etc/csm.json file and creates the SystemD service for automatic start.

For more details about SystemD refer to https://en.wikipedia.org/wiki/Systemd.

The list of popular Linux distribution where SystemD is supported by default is provided in
below table.

Table 1 - SystemD support dates

Linux Distribution Date (Version) SystemD released as default


CentOS April 2014 (7.14.04)
Debian April 2015 (v8)
Fedora May 2011 (v15)
Ubuntu April 2015 (v15.04)
Red Hat Enterprise Linux June 2014 (v7.0)
SUSE Linux Enterprise Server October 2014 (v12)
Docker

It is assumed that Docker is installed on the host operating system. CSM works with both
Docker Community Edition (CE) and Docker Enterprise Edition (EE).

For Docker installation procedure refer to official Docker documentation:


https://docs.docker.com/install/overview/

The Table 2 provides links to detailed Docker installation guides for various operating
systems.

Table 2 – Docker Installation Guides

Operating System Docker Installation Guide


Docker CE
CentOS https://docs.docker.com/install/linux/docker-ce/centos/
Debian https://docs.docker.com/install/linux/docker-ce/debian/
Fedora https://docs.docker.com/install/linux/docker-ce/fedora/
Ubuntu https://docs.docker.com/install/linux/docker-ce/ubuntu/
Docker EE
Oracle Linux https://docs.docker.com/install/linux/docker-ee/oracle/
Red Hat Enterprise Linux https://docs.docker.com/install/linux/docker-ee/rhel/
SUSE Linux Enterprise https://docs.docker.com/install/linux/docker-ee/suse/
Server

Cisco recommends using CentOS or Red Hat Enterprise Linux for host operating system
running CSM Server 4.0.

Docker Proxy Configuration

If CSM is installed behind a HTTPS proxy, for example in corporate settings, it is required to
add specific configuration in the Docker SystemD service file. This configuration allows the
Docker daemon to pull the containers from the repository using the HTTPS Proxy.

1. Create a systemd drop-in directory for the docker service:


$ sudo mkdir -p /etc/systemd/system/docker.service.d

2. Create a file called /etc/systemd/system/docker.service.d/https-proxy.conf that adds


the HTTPS_PROXY environment variable:
[Service]
Environment="HTTPS_PROXY=http://proxy.example.com:443/"

3. Flush the changes:


$ sudo systemctl daemon-reload

4. Restart Docker:
$ sudo systemctl restart docker
5. Verify that the configuration has been loaded:
$ systemctl show --property=Environment docker
Environment=HTTPS_PROXY=http://proxy.example.com:443/

Verify the Docker configuration

To check if Docker is installed properly and up and running the following command can be
issued:

$ systemctl is-active docker


active

To verify whether the Docker demon is configured properly and able to pull the images from
the repository pull and execute the test container:

$ docker run --rm hello-world


Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1725b59e92d: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
Status: Downloaded newer image for hello-world:latest

Hello from Docker!


This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:


1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/

For more examples and ideas, visit:


https://docs.docker.com/get-started/

Docker Proxy Configuration

If CSM is installed behind a HTTPS proxy, for example in corporate settings, it is required to
add specific configuration in the Docker SystemD service file. This configuration allows the
Docker daemon to pull the containers from the repository.

1. Create a systemd drop-in directory for the docker service:


$ sudo mkdir -p /etc/systemd/system/docker.service.d
2. Create a file called /etc/systemd/system/docker.service.d/https-proxy.conf that adds
the HTTPS_PROXY environment variable:
[Service]
Environment="HTTPS_PROXY=http://proxy.example.com:443/"

3. Flush the changes:


$ sudo systemctl daemon-reload

4. Restart Docker:
$ sudo systemctl restart docker

5. Verify that the configuration has been loaded:


$ systemctl show --property=Environment docker
Environment=HTTPS_PROXY=http://proxy.example.com:443/

CSM Server Installation


This section describes step-by-step procedure of CSM Server installation.

CSM Server requires a HTTPS connection to Cisco Site for downloading the latest information
about the currently posted software packages and SMUs. It also periodically checks if there
is the newer version of the CSM itself. Please follow the below section, if the host server
requires proxy configuration.

Configuration for host servers behind corporate proxy

If the host server is located behind the corporate proxy make sure the http_proxy
environment variable is set:

$ export https_proxy=http://proxy.example.com:80/

To make proxy setting permanent many operations systems uses /etc/environment file to
setup the system wide proxy.

cat /etc/environment
https_proxy=<your proxy address here>

Note: Please refer to your operating system documentation for details.

To verify that corporate proxy is set up properly for the installation run:
$ sudo env | grep proxy
https_proxy=http://proxy.esl.cisco.com:80/
$

You should see the https_proxy variable set accordingly your corporate requirements.
Running the installation script

To install the CSM Server the network script should be executed:

sudo -E bash -c "$(curl -sL https://devhub.cisco.com/artifactory/software-manager-


install-group/install.sh)"

The script can be also downloaded without execution:

$ curl -L https://devhub.cisco.com/artifactory/software-manager-install-group/install.sh -O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15544 100 15544 0 0 33089 0 --:--:-- --:--:-- --:--:-- 33072
$
$ chmod +x install.sh

And then run manually with some additional options, if required:


$ sudo ./install.sh --help
CSM Server installation script:
install.sh [OPTIONS]
Options:
-h
Print help
-c, --channel; <stable|beta>
Select upstream channel
-d, --data-share <dir>
Select the directory for data share
-p, --no-proxy-check
Do not check system vs docker proxy configuration
-m, --machine; <qemux86-64|raspberrypi3>
$

The example of installation script output is shown below:

$ sudo -E bash -c "$(curl -sL https://devhub.cisco.com/artifactory/software-manager-install-group/install.sh)"


Wed Dec 19 21:46:16 PST 2018 [INFO] Using system HTTPS Proxy <……>
Wed Dec 19 21:46:16 PST 2018 [INFO] CSM Cloud software update channel: stable
Wed Dec 19 21:46:16 PST 2018 [INFO] CSM Server installation process started
Wed Dec 19 21:46:16 PST 2018 [INFO] Fetching current version information...OK
Wed Dec 19 21:46:16 PST 2018 [INFO] CSM Supervisor Version 19 [stable]
Wed Dec 19 21:46:16 PST 2018 [INFO] Connecting to to Cisco Docker Hub: devhub-docker.cisco.com ...OK
Wed Dec 19 21:46:17 PST 2018 [INFO] Pulling CSM Supervisor image from devhub-docker.cisco.com ...OK
Wed Dec 19 21:46:58 PST 2018 [INFO] Initializing the CSM local data folder on host: '/usr/share/csm'...OK
Wed Dec 19 21:46:58 PST 2018 [INFO] Storing initial config to file: '/etc/csm.json'...OK
Wed Dec 19 21:46:58 PST 2018 [INFO] Installing startup scripts (csm-start)...OK
Wed Dec 19 21:46:58 PST 2018 [INFO] Installing uninstall script (csm-uninstall)...OK
Wed Dec 19 21:46:58 PST 2018 [INFO] Installing the csm-supervisor service...OK
Wed Dec 19 21:46:58 PST 2018 [INFO] Starting CSM Supervisor service...OK
Wed Dec 19 21:46:58 PST 2018 [INFO] Waiting for first component to be downloaded from repository
Wed Dec 19 21:47:09 PST 2018 [INFO] CSM Server installation finished.
Wed Dec 19 21:47:09 PST 2018 [INFO] The CSM Server is available at http://<server_ip>:5000
$
Open CSM Server Page

The CSM Server uses TCP port 5000 to provide access to Graphical User Interface (GUI).
To get access to the CSM Server page open http://<server_ip>:5000 in web browser, where
“server_ip” is the IP address or Hostname of the Linux server.

After couple of seconds the splash screen should be available informing about the
installation process in progress.

Figure 1 – CSM Server 4.0 Installation process

Depending on the Internet connection throughput the installation process should not take
more than 10 minutes to get the CSM Server fully installed and operating.

After a while the initial login window appears automatically. If not please refresh the page.

Figure 2 - CSM Server 4.0 initial login

The CSM installation is done.


The default credentials:
• Username: root
• Password: root

It is strongly recommended to change the password for user root right after the first login.
For more information please refer to the CSM User Guide by clicking Help from the top
menu bar of the CSM GUI, and selecting “Admin Tools”.

Removing CSM Server


To completely remove the CSM from host system run:

$ sudo csm-uninstall
Warning: This command will DELETE all the CSM containers and shared data folder from the host.
Are you sure you wish to continue (yes/no)? yes
Stopping csm-supervisor service
Disabling csm-supervisor service
Stopping CSM containers
Removing CSM containers
Removing CSM images
Removing CSM Docker bridge network
Removing CSM config file: /etc/csm.json
Removing CSM data folder /usr/share/csm (database, logs, certificated, plugins, local repository)
Are you sure you wish to continue (yes/no)? yes
CSM data folder deleted
$

During the uninstallation the CSM data folder can be saved. It gives possible to completely
remove the CSM images and then reinstall with preserving the data.

You might also like