From 5da49d21ebed1a127c8e68ae94a5edb9559959f0 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent@modolo.fr>
Date: Fri, 25 Sep 2020 10:06:59 +0200
Subject: [PATCH] clean ubuntu 20.04 script

---
 deploy.sh               | 21 -----------
 profile_ifb.sh          |  6 ---
 ubuntu-shellinabox.yaml | 83 -----------------------------------------
 3 files changed, 110 deletions(-)
 delete mode 100644 profile_ifb.sh

diff --git a/deploy.sh b/deploy.sh
index aeddce1..1f9bc0a 100644
--- a/deploy.sh
+++ b/deploy.sh
@@ -4,27 +4,6 @@
 # It is used to apply parameters specific to the current deployment.
 # It is executed secondly during a cloud deployement in IFB-Biosphere, after the *Installation* phase.
 
-source /etc/profile.d/ifb.sh
-LOCUSER=${LOCUSER:-ubuntu}
-LOCUSER_DIR=`eval echo "~$LOCUSER"`
-
-# Docker params
-# APP_IMG="gitlab-registry.in2p3.fr/ifb-biosphere/apps/<...>"
-
-# Configure  default user
-# IFB_DATADIR is set in profile ‘ifb.sh'
-ln -s $IFB_DATADIR $LOCUSER_DIR/data
-# Allow local user to run docker
-mkdir $IFB_DATADIR/mydatalocal
-
-# Mount IFB shared volumes
-ifb_sharedvols=$(ss-get --timeout=5 ifb_share_endpoints)
-if [ -n "$ifb_sharedvols" ]; then
-  wget -O /root/config_partages.py https://raw.githubusercontent.com/IFB-ElixirFr/biosphere-commons/master/scripts/utils/config_partages.py
-  python3 /root/config_partages.py $ifb_sharedvols
-  rm /root/config_partages.py
-fi
-
 USER_LOGIN=etudiant
 USER_PASSWORD=$( openssl rand -hex 12 )
 
diff --git a/profile_ifb.sh b/profile_ifb.sh
deleted file mode 100644
index 6edcc3b..0000000
--- a/profile_ifb.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-# IFB Bioinformatics environment
-export IFB_MAIN=/ifb
-export IFB_BIN=$IFB_MAIN/bin
-export IFB_DATADIR=$IFB_MAIN/data
-export PATH=$PATH:$IFB_BIN
-
diff --git a/ubuntu-shellinabox.yaml b/ubuntu-shellinabox.yaml
index 33bc95d..db7d081 100644
--- a/ubuntu-shellinabox.yaml
+++ b/ubuntu-shellinabox.yaml
@@ -8,68 +8,16 @@
   - name: Install requirements
     apt:
       name: 
-        - autofs
-        - fail2ban
-        - python3-pip
-        - nfs-common
-        - jq
         - openssl
         - shellinabox
       state: latest
 
-  - name: Remove old Docker version
-    apt:
-      name:
-        - docker
-        - docker-engine
-        - docker.io
-        - containerd
-        - runc
-      state: absent
-
-  - name: Install Docker deps
-    apt:
-      name:
-        - apt-transport-https
-        - ca-certificates
-        - curl
-        - gnupg-agent
-        - software-properties-common
-      state: latest
-
-  - name: Add Docker’s official GPG key
-    apt_key:
-      url: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg
-      state: present
-
-  - name: Add Docker's repository into sources list
-    apt_repository:
-      repo: deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
-      state: present
-
-  - name: Install Docker engine community
-    apt:
-      name:
-        - docker-ce
-        - docker-ce-cli
-        - containerd.io
-      state: latest
-
   - name: Configure shell in a box 
     shell: sed -i 's|SHELLINABOX_PORT=4200|SHELLINABOX_PORT=443|' /etc/default/shellinabox
 
   - name: Configure network
     shell: iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT && iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT && iptables-save
 
-  - name: Enable services
-    systemd:
-      name: "{{ item }}" 
-      enabled: yes
-      state: started
-    loop:
-      - docker
-      - fail2ban
-
   - name: Restart services
     systemd:
       name: "{{ item }}" 
@@ -77,34 +25,3 @@
       state: restarted
     loop:
       - shellinabox 
-
-  - name: Update pip
-    pip:
-      name: 
-        - pip
-      executable: pip3
-      state: latest
-
-  - name: Install docker-compose
-    pip:
-      name: 
-        - docker-compose
-      executable: pip3
-      state: latest
-
-  - name: Install Miniconda
-    script: miniconda-install.sh
-
-  - name: Copy IFB profile
-    copy:
-      src: profile_ifb.sh
-      dest: /etc/profile.d/ifb.sh
-      owner: root
-      mode: '0644'
-
-  - name: Create IFB root dir and bin
-    shell: . /etc/profile.d/ifb.sh && mkdir -p $IFB_BIN
-
-  - name: Create IFB data dir
-    shell: . /etc/profile.d/ifb.sh && mkdir -p $IFB_DATADIR
-
-- 
GitLab