diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d477de13d2c13492278ddeca4603f92813537434..7500f74e08ec1e7d46a5e5659b0bdaafc51c2e07 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,9 +24,6 @@ build: script: # --strict is too strict :) - mkdocs build -c --verbose - artifacts: - paths: - - mkdocs.log cache: key: build-cache paths: diff --git a/ECMWF.md b/ECMWF.md index fed49092a33a29a9a861502ca9f47cc57cce6e94..e011028c6345221d98b4cebbfde5cc7c9c51b2f7 100644 --- a/ECMWF.md +++ b/ECMWF.md @@ -28,6 +28,7 @@ startagent # Check if it is running ssh-add -l ``` + once you have a running ssh-agent, run a browserless login via python ```bash title="Connecting to ECMWF" @@ -37,7 +38,7 @@ tsh status # run ssh agent again ssh-add -l # now there should be two keys!!! -# Login to ECAccess in Bologna +# Login to ECaccess in Bologna ssh -J [user]@jump.ecmwf.int [user]@ecs-login # Login to HPC ATOS ssh -J [user]@jump.ecmwf.int [user]@hpc-login @@ -52,6 +53,28 @@ Environment variables configuration: You can set these variables in your `~/.bashrc` file to avoid typing these at every login. Please do not save your `ECMWF_PASSWORD` like this! +It is highly advised to add this to your `.ssh/config`: + +```conf title=".ssh/config" +Host jump.ecmwf.int shell.ecmwf.int + HostKeyAlgorithms +ssh-rsa*,rsa-sha2-512 + PubkeyAcceptedKeyTypes +ssh-rsa* + User [ECMWF USERNAME] +# For ecgate and Cray HPCF +Host ecg* cc* + HostKeyAlgorithms +ssh-rsa*,rsa-sha2-512 + PubkeyAcceptedKeyTypes +ssh-rsa* + User [ECMWF USERNAME] + ProxyJump shell.ecmwf.int +# For Atos HPCF +Host a?-* a??-* hpc-* hpc2020-* ecs-* + HostKeyAlgorithms +ssh-rsa*,rsa-sha2-512 + PubkeyAcceptedKeyTypes +ssh-rsa* + User [ECMWF USERNAME] + ProxyJump jump.ecmwf.int +``` + + ### SSH-agent It is required to have an SSH-agent running in order to connect to the ECMWF servers. The teleport module includes a `startagent` function to allow to reconnect to an existing ssh-agent. Do not start too many agents! @@ -60,6 +83,11 @@ It is required to have an SSH-agent running in order to connect to the ECMWF ser module load teleport # start a new agent or reconnect startagent + +# unsure about agents? +userservices sshtools -h +# kill all +userservices sshtools -k ``` @@ -110,4 +138,8 @@ ecaccess-file-copy ecaccess-queue-list # First get a valid certificate to get access ecaccess-certificate-create # -``` \ No newline at end of file +``` + +## ECaccess Gateway + +The department is running a member state ecaccess gateway service. \ No newline at end of file diff --git a/Python/README.md b/Python/README.md index 10077fdf1623bffbf9f135db8fdeb4b440a03287..0db711750f5ecc7edbc2eeb132e0e08998ff2119 100644 --- a/Python/README.md +++ b/Python/README.md @@ -5,17 +5,48 @@ **What is conda ?** -[link]() This is the package manager for the anaconda or miniconda distribution of Python. It allows to install packages and create environments and much much more. However, mostly you will use it to install packages and create environments for your code. It is slow. +[link](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) **What is micromamba ?** -This is a replacement package manager for Python that is independent from a distribution, -[link](https://github.com/mamba-org/mamba) +This is a replacement package manager for Python that is independent from a distribution and can be used to create fuly independent python environments with just the micromamba executable as strting point. +[link](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html) + +```sh title="Conda environment" +# Download and extract just micromamba exe +wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj --strip-components=1 bin/micromamba +# show +micromamba info + __ + __ ______ ___ ____ _____ ___ / /_ ____ _ + / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/ + / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ / + / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/ + /_/ + + + environment : None (not found) + env location : - + user config files : /home/user/.mambarc + populated config files : + libmamba version : 1.1.0 + micromamba version : 1.1.0 + curl version : libcurl/7.87.0 OpenSSL/1.1.1s zlib/1.2.13 libssh2/1.10.0 nghttp2/1.47.0 + libarchive version : libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2 + virtual packages : __unix=0=0 + __linux=6.1.12=0 + __glibc=2.37=0 + __archspec=1=x86_64 + channels : + base environment : /home/user/micromamba + platform : linux-64 +``` + **What should I use?** -It is recommended to use is micromamba, which is way faster than conda. It has a smaller footprint and it works almost identical as conda. It is a c++ replacement of conda/mamba. +It is recommended to use micromamba, which is way faster than conda. It has a smaller footprint and it works almost identical as conda. It is a c++ replacement of conda/mamba. ### install packages @@ -23,7 +54,23 @@ It is recommended to use is micromamba, which is way faster than conda. It has a There are sometimes different versions available with different build options as well. -`conda install -c <channel> <package_name>=<version>=<build_string>` +```sh title="Conda environment" +# load the minimum module (alternative load anaconda3) +module load miniconda3 +# Create an environment and install some packages +conda create --name <my-environment> <package_name>=<version>=<build_string> +# install packages into that environment again +conda install -c <channel> -n <my-environment> <package_name>=<version>=<build_string> +``` + +```sh title="micromamba environment" +# load micromamba exe (just one exe) +module load micromamba +# +micromamba create -n <my-environment> <package_name>=<version>=<build_string> +micromamba install -c conda-forge -n <my-environment> <package_name>=<version>=<build_string> +``` + ## Q: Installing Cartopy on Jet Cluster or any other module based environment? diff --git a/SSH-VPN-VNC/connect2vpn b/SSH-VPN-VNC/connect2vpn index 9ce7a78f4fb40d709d03a43027b81a691ac2b8cf..e2a44f8b8e0b03c2186b1d22ad49b4c0a3aecfc3 100755 --- a/SSH-VPN-VNC/connect2vpn +++ b/SSH-VPN-VNC/connect2vpn @@ -41,12 +41,12 @@ fi read -p "[VPN] Full (1) or split (None) tunnel? (1/None): " REPLY if [ "$REPLY" == "" ]; then echo "[VPN] Connecting split-tunnel ..." - cmd="f5fpc -s -t vpn.univie.ac.at -u ${VPN_USER}" + cmd="f5fpc -s -t vpn.univie.ac.at" else echo "[VPN] Connecting full-tunnel ..." - cmd="f5fpc -s -t vpn.univie.ac.at:8443 -u ${VPN_USER}" + cmd="f5fpc -s -t vpn.univie.ac.at:8443" fi -echo "[VPN] Starting Monitor..." +echo "[VPN] Testing VPN Client..." # Show status export -f vpninfos init=true @@ -59,7 +59,15 @@ do f5fpc -o fi echo "[VPN] Starting connection ..." - eval $cmd + if [ -z "$VPN_PWD" ]; then + read -p "[VPN] u:account password:" VPN_PWD + fi + read -p "[VPN] TOTP Code (6 digits/empty):" VPN_TOTP + if [ -n "$VPN_TOTP" ]; then + eval "${cmd} -p ${VPN_PWD} -u ${VPN_USER}@${VPN_TOTP}" + else + eval "$cmd -p ${VPN_PWD} -u ${VPN_USER}" + fi if $init; then init=false fi @@ -70,6 +78,7 @@ do break fi done +unset VPN_PWD VPN_USER VPN_TOTP echo "[VPN] Shutting down ..." # Disconnect f5fpc -o diff --git a/mkdocs/imgw-cheatsheet.pdf b/mkdocs/imgw-cheatsheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cff080ee1c63f0c00f5460c9e5a9da1bec7a3e57 Binary files /dev/null and b/mkdocs/imgw-cheatsheet.pdf differ