Skip to content
Snippets Groups Projects
Unverified Commit 5da49d21 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

clean ubuntu 20.04 script

parent 9b9da1ff
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
......
# IFB Bioinformatics environment
export IFB_MAIN=/ifb
export IFB_BIN=$IFB_MAIN/bin
export IFB_DATADIR=$IFB_MAIN/data
export PATH=$PATH:$IFB_BIN
......@@ -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
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