Commit 657ad7e8 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

Update ecolyo and enedis konnector settings

parent 5a0ddda5
......@@ -21,10 +21,10 @@ echo "Creating instance ${INSTANCE_ID}.${COZY_TLD} ..."
docker-compose exec cozy ./cozy instances add $OIDC_CONTEXT --host 0.0.0.0 --apps drive,collect,settings,home "${INSTANCE_ID}.${COZY_TLD}" | tee "${TMPFILE}"
# Install grand lyon apps
docker-compose exec cozy ./cozy konnectors install enedis-scraping-connector --domain "${INSTANCE_ID}.${COZY_TLD}" file:///tmp/apps_sources/enedis-scraping-connector-build
docker-compose exec cozy ./cozy konnectors install grdf-scraping-connector --domain "${INSTANCE_ID}.${COZY_TLD}" file:///tmp/apps_sources/grdf-scraping-connector-build
docker-compose exec cozy ./cozy konnectors install egl-api-connector --domain "${INSTANCE_ID}.${COZY_TLD}" file:///tmp/apps_sources/egl-api-connector-build
docker-compose exec cozy ./cozy apps install energy-dataviz --domain "${INSTANCE_ID}.${COZY_TLD}" file:///tmp/apps_sources/energy-dataviz-build
docker-compose exec cozy ./cozy konnectors install enedis-konnector --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-konnector.git#build
docker-compose exec cozy ./cozy konnectors install grdf-scraping-connector --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/pocs/cozy/grdf-scraping-connector.git#build
docker-compose exec cozy ./cozy konnectors install egl-api-connector --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/pocs/cozy/egl-api-connector.git#build
docker-compose exec cozy ./cozy apps install ecolyo --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git#build
## To replace by registry://store/something after next cozy-stack release
docker-compose exec cozy ./cozy apps install --domain "${INSTANCE_ID}.${COZY_TLD}" store registry://store/stable | tee -a "${TMPFILE}"
......
#!/usr/bin/env bash
# Adds the API key and url needed by the EGL connector to function
# Adds the API key and url needed by konnectors to function
# These information are defined in the .env file
echo Adding egl secrets to DB ...
echo Adding secrets to DB ...
source .env
docker-compose exec db curl -X PUT -d "{\"_id\":\"egl-api-connector\",\"grant_mode\":\"secret\",\"slug\":\"egl-api-connector\",\"secret\":{\"eglBaseURL\":\"${EGL_BASE_URL}\",\"eglAPIAuthKey\":\"${EGL_API_AUTH_KEY}\"}}" http://127.0.0.1:5984/secrets%2Fio-cozy-account_types/egl-api-connector
docker-compose exec db curl -X PUT -d "{\"_id\":\"enedis-konnector\",\"grant_mode\":\"authorization_code\",\"client_id\":\"${ENEDIS_CLIENT_ID}\",\"client_secret\":\"${ENEDIS_CLIENT_SECRET}\",\"auth_endpoint\":\"${ENEDIS_AUTH_ENDPOINT}\",\"token_endpoint\": \"${ENEDIS_TOKEN_ENDPOINT}\",\"token_mode\":\"get\"}" http://127.0.0.1:5984/secrets%2Fio-cozy-account_types/enedis-konnector
\ No newline at end of file
#!/bin/bash
# Get apps and connectors
mkdir ./apps_sources
cd apps_sources
rm -rf *
wget https://forge.grandlyon.com/pocs/cozy/enedis-scraping-connector/-/archive/build/enedis-scraping-connector-build.tar.gz
wget https://forge.grandlyon.com/pocs/cozy/grdf-scraping-connector/-/archive/build/grdf-scraping-connector-build.tar.gz
wget https://forge.grandlyon.com/pocs/cozy/egl-api-connector/-/archive/build/egl-api-connector-build.tar.gz
wget https://forge.grandlyon.com/pocs/cozy/energy-dataviz/-/archive/build/energy-dataviz-build.tar.gz
# Untar all
for a in $(ls -1 *.tar.gz); do tar -zxvf $a; done
rm -f *.tar.gz
......@@ -10,11 +10,23 @@ COZY_TLD=my.domain.com
# The admin passphrase
COZY_ADMIN_PASSPHRASE=mypassword
# The base URL to access EGL API
EGL_BASE_URL=mybaseurl
# The authentication key for EGL API
EGL_API_AUTH_KEY=myapiauthkey
# The client id for enedis API
ENEDIS_CLIENT_ID=myclientid
# The client secret for enedis API
ENEDIS_CLIENT_SECRET=myclientsecret
# The base URL to access oauth proxy for authentification
ENEDIS_AUTH_ENDPOINT=myauthproxyendpoint
# The base URL to access oauth proxy for token
ENEDIS_TOKEN_ENDPOINT=mytokenproxyendpoint
# OIDC
OIDC_IDP=my.oidc.idp.domain.com
#!/bin/bash
# Initialise your cozy cloud / reset it if it already exists (this will delete all your data and instances)
# Download the apps
./download_apps.sh
# Config file generation
sudo ./generate-cozy-yaml.sh
......@@ -26,5 +23,5 @@ sudo ./customize-cozy.sh
sudo ./create-instance.sh demooidc oidc
# Instance creation, replace demo by the name you want
sudo ./create-instance.sh demo
# Insertion of the EGL api secrets in the database
sudo ./egl-db-init.sh
# Insertion of the api secrets in the database
sudo ./db-init.sh
#!/bin/bash
# Update the app and connectors from Grand Lyon
# Update the app from Grand Lyon
echo "Updating Apps & Konnectors ..."
echo "Updating Apps ..."
docker-compose exec cozy ./cozy konnectors update enedis-scraping-connector --all-domains file:///tmp/apps_sources/enedis-scraping-connector-build
docker-compose exec cozy ./cozy konnectors update grdf-scraping-connector --all-domains file:///tmp/apps_sources/grdf-scraping-connector-build
docker-compose exec cozy ./cozy konnectors update egl-api-connector --all-domains file:///tmp/apps_sources/egl-api-connector-build
docker-compose exec cozy ./cozy apps update energy-dataviz --all-domains file:///tmp/apps_sources/energy-dataviz-build
docker-compose exec cozy ./cozy apps update ecolyo --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git#build
#!/bin/bash
# Update the app and connectors from Grand Lyon
# Update konnectors
sudo ./update_apps.sh
# Cozy customization
sudo ./update_konnectors.sh
\ No newline at end of file
#!/bin/bash
# Update the connectors from Grand Lyon
echo "Updating Konnectors ..."
docker-compose exec cozy ./cozy konnectors update enedis-konnector --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-konnector.git#build
docker-compose exec cozy ./cozy konnectors update grdf-scraping-connector --all-domains git://forge.grandlyon.com/pocs/cozy/grdf-scraping-connector.git#build
docker-compose exec cozy ./cozy konnectors update egl-api-connector --all-domains git://forge.grandlyon.com/pocs/cozy/egl-api-connector.git#build
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment