Skip to content
Snippets Groups Projects
Commit 332ce57a authored by Guido Sterbini's avatar Guido Sterbini
Browse files

pytimber is working

parent 6e8903f0
No related branches found
No related tags found
No related merge requests found
Pipeline #2587669 passed
...@@ -46,6 +46,19 @@ When you are in the docker you have to do: ...@@ -46,6 +46,19 @@ When you are in the docker you have to do:
kinit $YOUR_NICE_LOGIN_NAME kinit $YOUR_NICE_LOGIN_NAME
``` ```
### To connect to NXCALS
Open a terminal on your laptop and copy the `run_sshuttle.sh` file from the container home to your local_host_home (we assume is `~`).
From the local_host run then the `~/run_sshuttle.sh connect`.
Open a new tab in your terminal and launch the container.
In the container do
```
kinit sterbini
~/local_host_home/run_sshuttle.sh connect
python test_pytimber.py
```
# To make the docker # To make the docker
To build the docker To build the docker
......
#!/bin/sh #!/bin/sh
# From https://codimd.web.cern.ch/vjC8BHbTS7etHwJve-K2Uw # From https://codimd.web.cern.ch/vjC8BHbTS7etHwJve-K2Uw
case $1 in case $1 in
connect) connect)
sshuttle --dns -vr sterbini@lxplus.cern.ch 188.0.0.0/8 137.138.0.0/16 172.18.0.0/16 128.141.0.0/16 128.142.0.0/16 188.184.0.0/15 --daemon --pidfile /tmp/sshuttle.pid sshuttle --dns -v --remote sterbini@lxplus.cern.ch \
10.0.0.0/16 128.141.0.0/16 128.142.0.0/16 137.138.0.0/16 172.18.0.0/16 185.249.56.0/22 188.0.0.0/8 192.65.196.0/23 192.91.242.0/24 194.12.128.0/18 2001:1458::/32 2001:1459::/32 \
10.0.0.0/8 \
100.64.0.0/10 \
10.100.0.0/16 \
10.254.0.0/16 \
10.76.0.0/15 \
128.141.0.0/16 \
128.142.0.0/16 \
137.138.0.0/16 \
172.16.0.0/12 \
185.249.56.0/22 \
188.184.0.0/15 \
188.184.0.0/16 \
188.185.0.0/15 \
188.185.0.0/16 \
192.16.155.0/24 \
192.16.156.0/22 \
192.16.160.0/22 \
192.16.164.0/23 \
192.16.166.0/24 \
192.65.183.0/24 \
192.65.184.0/21 \
192.65.192.0/22 \
192.65.196.0/23 \
192.91.236.0/22 \
192.91.240.0/22 \
192.91.242.0/24 \
192.91.244.0/23 \
192.91.246.0/24 \
194.12.128.0/18 --daemon --pidfile /tmp/sshuttle.pid
shift shift
;; ;;
disconnect) disconnect)
...@@ -16,5 +44,5 @@ case $1 in ...@@ -16,5 +44,5 @@ case $1 in
echo "Unknown option\nUsage:" echo "Unknown option\nUsage:"
echo "\t $0 connect : to start VPN-like connection to CERN" echo "\t $0 connect : to start VPN-like connection to CERN"
echo "\t $0 disconnect : to stop it" echo "\t $0 disconnect : to stop it"
;; ;;
esac esac
import pytimber
print("pytimber imported.")
ldb=pytimber.LoggingDB(source='nxcals') # Backport API
print("LoggiggDB connected.")
print('Query: getLHCFillData(7334)...')
a=ldb.getLHCFillData(7334)
print(a)
print('Exiting...')
import jpype as jp
System = jp.JClass("java.lang.System")
System.exit(0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment