User Tools

Site Tools


slowcontrol:basic_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
slowcontrol:basic_setup [2020/08/28 09:57] – ↷ Page name changed from slowcontrol:seting_up to slowcontrol:basic_setup himuserslowcontrol:basic_setup [2022/01/14 18:44] (current) – external edit 127.0.0.1
Line 1: Line 1:
 **Steps for setting up slow control:** **Steps for setting up slow control:**
 +
 +The purpose of this page is to list instructions to create a docker container containing all the tools required to run a slow control system. EPICS is the back-end. It keeps track of the process variables and Handels the communication between the slow control computer and the components of a scientific experimental setup over Local network. Node-RED is the front-end. It interacts with EPICS using EPICS-Python interface. With Node-RED 'flows' and GUI are created.
 + 
 +The following steps are for reference. If the intention is to just set up a slow control without having to go through underlying details, then execute step one and skip to the last command on this page.
  
 **1. Installing docker on ubuntu**: Open terminal in ubuntu and run the following commands. **1. Installing docker on ubuntu**: Open terminal in ubuntu and run the following commands.
Line 11: Line 15:
  
 <code> <code>
-docker run --it  --network host --name slow_control ubuntu bin/bash+docker run --it  --network host --name slow_control ubuntu bin/bash
 </code> </code>
 +
 +Containers are usually completely isolated from the host system. But containers with '--network host' tag share the host network.
 +
 +**Note:**
 +
 +'$' symbol is used to represent host terminal.
 +'#' symbol is used to represent terminal inside the container.
  
 **3. Access terminal inside the container** **3. Access terminal inside the container**
  
 <code> <code>
-docker exec -it slow_control bin/bash+docker exec -it slow_control bin/bash
 </code> </code>
  
 **4. Install epics using the script on [[epics:autoinstall|autoinstall]] page** **4. Install epics using the script on [[epics:autoinstall|autoinstall]] page**
 +
 +The downloaded script should be copied into the container.
 +Open another terminal window on the host and execute the following command.
 +<code>
 +docker cp <source_path>|- <container_name>:<paht_inside_container>
 +</code>
  
 **5. install Node.js** **5. install Node.js**
 <code> <code>
-curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - +curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - 
-sudo apt-get install -y nodejs+sudo apt-get install -y nodejs
 </code> </code>
  
 **5. Install Node-RED** **5. Install Node-RED**
 <code> <code>
-sudo npm install -g --unsafe-perm node-red+sudo npm install -g --unsafe-perm node-red 
 +</code> 
 + 
 +Now the basic set up is complete 
 + 
 +**6. create an account in docker-hub https://hub.docker.com/signup and create a repository named "slow_control" 
 + 
 +**7. Sign into docker using the same account 
 +<code> 
 +$ docker login 
 +</code> 
 +(you will be prompted form username and password). 
 + 
 +**8. Create an image of the container that has been created in the previous steps.** 
 + 
 +<code> 
 +$ docker commit slow_control 
 +</code> 
 + 
 +(you will see a series of alpha-numeric characters after executing this command, this is called a 'tag'
 +Assign a name to the image 
 + 
 +<code> 
 +$ docker <tag> slow_control:v1 
 +</code> 
 + 
 +**9. Upload the image to repository that was created in step 6** 
 +<code> 
 +$ docker push <username>/slow_control:v1 
 +</code> 
 + 
 +Now the image slow_control:v1 can be pulled to any computer and a container can be setup. All the prerequisite are present in this container. 
 + 
 +The following command can be executed to setup a container which has already been created. 
 +<code> 
 +$ docker run --it  --network host --name slow_control ravigmathim/slow_control:v1.2 bin/bash
 </code> </code>
  
 +The 'v1.2' in the 'ravigmathim/slow_control:v1.2' refers to version. It may change.
  
slowcontrol/basic_setup.1598608651.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki