Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 750edc6c authored by SAUCEZ Damien's avatar SAUCEZ Damien
Browse files

backup

parent 20d00d03
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
roles: roles:
- role: common - role: common
- role: docker
tasks: tasks:
- name: Copy private key - name: Copy private key
......
...@@ -3,11 +3,10 @@ XP=myxp6 ...@@ -3,11 +3,10 @@ XP=myxp6
DIR=$(dirname $(realpath "$0")) DIR=$(dirname $(realpath "$0"))
RESULTS_DIR=/srv/testbed/results/ RESULTS_DIR=/srv/testbed/results/
#rm -rf "$DIR/.venv" rm -rf "$DIR/.venv"
python3 -m venv "$DIR/.venv" python3 -m venv "$DIR/.venv"
source "$DIR/.venv/bin/activate" source "$DIR/.venv/bin/activate"
#pip install -r requirements.txt pip install -r requirements.txt
#pip3 install -r requirements.txt
# this exists due to a bug in ansible... # this exists due to a bug in ansible...
export LC_ALL="C.UTF-8" export LC_ALL="C.UTF-8"
...@@ -28,21 +27,21 @@ for node in "${NODES[@]}"; do ...@@ -28,21 +27,21 @@ for node in "${NODES[@]}"; do
$POS nodes image $node $IMAGE $POS nodes image $node $IMAGE
done done
###DDfor node in "${NODES[@]}"; do for node in "${NODES[@]}"; do
###DD $POS nodes reset $node & $POS nodes reset $node &
###DDdone done
###DD
###DDwait wait
###DD
###DD# 0. Prepare deployment nodes # 0. Prepare deployment nodes
###DDfor node in "${NODES[@]}"; do for node in "${NODES[@]}"; do
###DD ssh-copy-id -i ~/.ssh/id_rsa.pub -f root@$node ssh-copy-id -i ~/.ssh/id_rsa.pub -f root@$node
###DDdone done
###DD
###DDansible-playbook -i pos/inventory deploy.yaml ansible-playbook -i pos/inventory deploy.yaml
###DD$POS nodes copy --dest reference_implementation/pos/secrets.yaml $DEPLOY_NODE pos/secrets.yaml $POS nodes copy --dest reference_implementation/pos/secrets.yaml $DEPLOY_NODE pos/secrets.yaml
###DD$POS nodes copy --dest reference_implementation/pos/password $DEPLOY_NODE pos/password $POS nodes copy --dest reference_implementation/pos/password $DEPLOY_NODE pos/password
###DD
###DD# 1. Create the cluster ###DD# 1. Create the cluster
###DD$POS commands launch $DEPLOY_NODE --infile "pos/cluster.sh" --verbose --name "cluster.sh" ###DD$POS commands launch $DEPLOY_NODE --infile "pos/cluster.sh" --verbose --name "cluster.sh"
###DD ###DD
...@@ -55,10 +54,19 @@ done ...@@ -55,10 +54,19 @@ done
###DD# 3. Deploy 5G ###DD# 3. Deploy 5G
###DD#ansible-playbook -i pos/inventory -i inventories/production --extra-vars "@pos/params.yaml" --extra-vars "@pos/params.5g.yaml" 5g.pos.yaml --limit "control[0]" ###DD#ansible-playbook -i pos/inventory -i inventories/production --extra-vars "@pos/params.yaml" --extra-vars "@pos/params.5g.yaml" 5g.pos.yaml --limit "control[0]"
# 4. Publish results
ALLOC_ID=$( $POS allocations show $DEPLOY_NODE | jq -r .id ) ALLOC_ID=$( $POS allocations show $DEPLOY_NODE | jq -r .id )
RESULTS_FOLDER=$RESULTS_DIR/$($POS allocations show $ALLOC_ID | jq -r .result_folder) RESULTS_FOLDER=$RESULTS_DIR/$($POS allocations show $ALLOC_ID | jq -r .result_folder)
ARTIFACT_SIZE=$(du -s $RESULTS_FOLDER | cut -f 1) ARTIFACT_SIZE=$(du -s $RESULTS_FOLDER | cut -f 1)
echo $ARTIFACT_SIZE echo $ARTIFACT_SIZE
echo $RESULTS_FOLDER
tar -cvvzf dataset.tar.gz -C $RESULTS_FOLDER .
$POS nodes copy --recursive --dest mini-dmi $DEPLOY_NODE ~/mini-dmi
$POS nodes copy --recursive --dest mini-dmi/storage-client-playground/ $DEPLOY_NODE dataset.tar.gz
ansible-playbook -i pos/inventory --extra-vars "@pos/params.yaml" --extra-vars "artifact_size=${ARTIFACT_SIZE}" --extra-vars "@secrets.yaml" --vault-password-file pos/password test.yaml
ansible-playbook -vvv --extra-vars "@pos/params.yaml" --extra-vars "artifact_size=${ARTIFACT_SIZE}" --extra-vars "@secrets.yaml" --vault-password-file pos/password test.yaml
...@@ -13,7 +13,20 @@ ...@@ -13,7 +13,20 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
_dataset_upload_url: "{{ _mrs.stdout | from_json | json_query('uploadUrl') }}" _dataset_upload_url: "{{ _mrs.stdout | from_json | json_query('uploadUrl') }}"
_dataset_doi: "{{ _mrs.stdout | from_json | json_query('digitalObjectId') }}" _dataset_doi: "{{ _mrs.stdout | from_json | json_query('digitalObjectId') }}"
_dataset_filename: "dataset.tar.gz"
- name: Show upload URL - name: Show upload URL
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ _dataset_upload_url }} {{ _dataset_doi }}" msg: "{{ _dataset_upload_url }} {{ _dataset_doi }}"
- name: Generate upload script
ansible.builtin.template:
src: upload.sh.j2
dest: mini-dmi/upload.sh
mode: '0550'
- name: Upload the dataset to the MRS
ansible.builtin.shell: "./upload.sh"
args:
chdir: mini-dmi
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"format": "application/x-tar", "format": "application/x-tar",
"medium": "", "medium": "",
"compressionFormat": "application/gzip", "compressionFormat": "application/gzip",
"fileMetadata": "asdasdasd", "fileMetadata": "",
"dataStandard": "", "dataStandard": "",
"encodingFormat": "" "encodingFormat": ""
} }
#!/usr/bin/bash
docker compose run storage_client curl -v --upload-file "{{ _dataset_filename }}" "{{ _dataset_upload_url }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment