If you are using Cisco's new linux-based Cisco Software Manager server, then you probably want to make sure there is a startup service for it.
I'll assume that you've already installed the CSM server on a systemd-based linux system. The commands given below were used in RedHat/CentOS. For purposes of this post, I'll use `/usr/local` as the csmserver install location, and `/usr/local/csm/csmserver/env` as the Python virtual envrionment location.
If you're using a python virtual environment, then you'll need to explicitly tell the CSM server where your environment's python interpreter and gunicorn executable are. If anyone knows how to create the systemd service without having to do this, please share - because my attempts failed. If you aren't using a python virtual environment, you can skip to the next section where we create the systemd service.
- Open the file /usr/local/csm/csmserver/csmserver in your editor. - Change the following line to include the absolute path to python in your virtual environment. Don't close the file yet. # for Python interpreter PYTHON="/usr/local/csm/csmserver/env/bin/python"
- Within the same file, add a variable for gunicorn in the appropriate section. Don't close the file yet.
# for gunicorn GUNICORN="/usr/local/csm/csmserver/env/bin/gunicorn"
- In the 'function start_csmserver' and 'function start_secure_csmserver' sections, change each instance of `gunicorn` to `$GUNICORN`, to match our newly created variable. There should be one place to change in each section. Then save and close the csmserver file.
- Start the service. Be sure to verify that the service is active and that you can see the gunicorn and csmdispatcher.py processes.
systemctl start csm.service systemctl status csm.service
Keep in mind that if you upgrade your CSM server in the future and you use a Python virtual environment, you'll need to go back in to the csmserver file and re-add the appropriate lines in the Getting Started section above.
That should be all you need to create your systemd service for the Cisco Software Manager server!
Cisco Champion Radio · S8|E9 Innovations to Achieve a Trustworthy Infrastructure
How do you know for certain that a router in your network has not been altered with since you deployed it? Wouldn’t it be great if you can cryptographically challenge your r...
Hi all! Does anyone know an easy and quick way to show the installed Service Pack level on IOS XR for the NCS platform? I know I can compare the packages within the Service Pack TAR archive file and the output of the command: "(admin) show insta...
Hello everyone,I have a ASR 920 (ASR-920-12SZ-IM) currently on loan from the Amsterdam Demo Depot and I would need some help in configuring ethernet virtual connections. I have no experience in configuring these services. I have attached a drawing to...
Hi, Guys, There are two SRMS servers in the network, I wonder how SRMS Clients select the one of SRMS server as the active one, what's the election factors and how could i specify the one of SRMS server as the active server, the another one as redund...