Commit 743f2de3aeef7f4475b76f64ff7b908fbd451f13

Authored by Chloé Azria
1 parent baef8fa2
Exists in master

working with only the .env institution,server config

1 # enter here all key = value you need to path in docker-compose.yaml file - example for voparis-tap-planeto 1 # enter here all key = value you need to path in docker-compose.yaml file - example for voparis-tap-planeto
2 VERSION=11 2 VERSION=11
3 -SERVER=voparis-tap-planeto 3 +#SERVER=voparis-tap-planeto
4 # depot sans l'extension .git 4 # depot sans l'extension .git
5 -GIT=voparis-tap-planeto  
6 -GITURL=https://voparis-gitlab.obspm.fr/dachs 5 +#GIT=voparis-tap-planeto
  6 +#GITURL=https://voparis-gitlab.obspm.fr/dachs
7 PUBKEY="your local public key" 7 PUBKEY="your local public key"
dachs-dockerfile
1 ARG VERSION 1 ARG VERSION
2 FROM debian:$VERSION 2 FROM debian:$VERSION
3 3
4 -ARG SERVER  
5 ARG GITURL 4 ARG GITURL
6 -ARG GIT 5 +ARG SERVER
  6 +ARG INSTITUTION
  7 +
7 ARG HOMEPATH=/home/dachsroot 8 ARG HOMEPATH=/home/dachsroot
8 ARG PUBKEY 9 ARG PUBKEY
9 10
  11 +
10 ### 12 ###
11 #install de la clé + depot Dachs 13 #install de la clé + depot Dachs
12 # ajout de postgres en amont sinon l'install de dachs plante 14 # ajout de postgres en amont sinon l'install de dachs plante
@@ -16,6 +18,7 @@ RUN apt-get -y update @@ -16,6 +18,7 @@ RUN apt-get -y update
16 RUN apt-get -y upgrade 18 RUN apt-get -y upgrade
17 RUN apt-get install -y curl apt-utils 19 RUN apt-get install -y curl apt-utils
18 20
  21 +# add dachs source
19 RUN curl -o /etc/apt/trusted.gpg.d/gavo-archive.key.asc https://docs.g-vo.org/archive-key.asc 22 RUN curl -o /etc/apt/trusted.gpg.d/gavo-archive.key.asc https://docs.g-vo.org/archive-key.asc
20 RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/sources.list.d/dachs.list 23 RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/sources.list.d/dachs.list
21 24
@@ -27,9 +30,7 @@ RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/so @@ -27,9 +30,7 @@ RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/so
27 RUN apt-get -y update 30 RUN apt-get -y update
28 RUN apt-get -y upgrade 31 RUN apt-get -y upgrade
29 RUN apt-get install -y postgresql-13 postgresql-13-q3c postgresql-13-pgsphere 32 RUN apt-get install -y postgresql-13 postgresql-13-q3c postgresql-13-pgsphere
30 -#RUN service postgresql restart  
31 RUN apt-get install -y git wget awstats net-tools vim 33 RUN apt-get install -y git wget awstats net-tools vim
32 -#RUN apt-get install -y gavodachs2-server  
33 RUN service postgresql restart && apt-get install -y gavodachs2-server 34 RUN service postgresql restart && apt-get install -y gavodachs2-server
34 RUN apt-get install -y openssh-server openssh-client apache2 w3m 35 RUN apt-get install -y openssh-server openssh-client apache2 w3m
35 36
@@ -55,21 +56,33 @@ RUN chown dachsroot:gavo -R /home/dachsroot/.ssh @@ -55,21 +56,33 @@ RUN chown dachsroot:gavo -R /home/dachsroot/.ssh
55 # Installation des sources 56 # Installation des sources
56 ### 57 ###
57 58
58 -#RUN mkdir $PATH$SERVER -p  
59 -#RUN git clone $GITURL/$GIT.git $HOMEPATH/$SERVER/$GIT 59 +#copy the configuration files into the docker
60 COPY . $HOMEPATH 60 COPY . $HOMEPATH
61 61
62 62
  63 +#import dachs server configuration files from git
  64 +RUN echo $GITURL/vespa/dachs/servers/$INSTITUTION/$SERVER.git
  65 +RUN git clone $GITURL/vespa/dachs/servers/$INSTITUTION/$SERVER.git $HOMEPATH/server
  66 +
  67 +
  68 +
63 #on déplace les fichiers 69 #on déplace les fichiers
  70 +# dachs server configuration
64 RUN cp $HOMEPATH/000-default.conf /etc/apache2/sites-enabled/000-default.conf 71 RUN cp $HOMEPATH/000-default.conf /etc/apache2/sites-enabled/000-default.conf
65 RUN cp $HOMEPATH/ports.conf /etc/apache2/ports.conf 72 RUN cp $HOMEPATH/ports.conf /etc/apache2/ports.conf
66 RUN cp $HOMEPATH/awstats.dachs.conf /etc/awstats/awstats.dachs.conf 73 RUN cp $HOMEPATH/awstats.dachs.conf /etc/awstats/awstats.dachs.conf
67 -RUN cp $HOMEPATH/gavo.rc /etc/gavo.rc 74 +RUN cp $HOMEPATH/server/gavo.rc /etc/gavo.rc
68 RUN cp $HOMEPATH/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh 75 RUN cp $HOMEPATH/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
69 RUN chmod +x /usr/bin/docker-entrypoint.sh 76 RUN chmod +x /usr/bin/docker-entrypoint.sh
70 -RUN cp $HOMEPATH/defaultmeta.txt /var/gavo/etc/defaultmeta.txt 77 +RUN cp $HOMEPATH/server/defaultmeta.txt /var/gavo/etc/defaultmeta.txt
71 RUN mkdir /var/gavo/web/nv_static/img/ -p 78 RUN mkdir /var/gavo/web/nv_static/img/ -p
72 RUN cp $HOMEPATH/logo* /var/gavo/web/nv_static/img/ 79 RUN cp $HOMEPATH/logo* /var/gavo/web/nv_static/img/
  80 +
  81 +
  82 +#import services from git
  83 +#clone all repositories from the group -- only if the gitlab project is Public
  84 +RUN wget -O $HOMEPATH/group.json $GITURL'/api/v4/groups/vespa%2Fdachs%2Fservices%2F'$INSTITUTION'%2F'$SERVER
  85 +RUN mkdir $HOMEPATH/services/ && cd $HOMEPATH/services/ && egrep -o 'https://[^"]+\.git' $HOMEPATH/group.json|xargs -n 1 -P 8 git clone
73 RUN cp -r $HOMEPATH/services/* /var/gavo/inputs/ 86 RUN cp -r $HOMEPATH/services/* /var/gavo/inputs/
74 87
75 ### 88 ###
@@ -98,14 +111,14 @@ RUN chgrp 755 /etc/cron.daily/awstats @@ -98,14 +111,14 @@ RUN chgrp 755 /etc/cron.daily/awstats
98 111
99 112
100 ### 113 ###
101 -# Script de démarrage des servcices 114 +# Script de démarrage des services
102 ### 115 ###
103 116
104 -#RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh  
105 -#RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh 117 +RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh
  118 +RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh
106 119
107 # ajout au script pour maintenir docker up 120 # ajout au script pour maintenir docker up
108 -#RUN echo "tail -f /dev/null" >> /usr/bin/docker-entrypoint.sh 121 +RUN echo "tail -f /dev/null" >> /usr/bin/docker-entrypoint.sh
109 122
110 123
111 ENTRYPOINT /usr/bin/docker-entrypoint.sh && tail -f /dev/null 124 ENTRYPOINT /usr/bin/docker-entrypoint.sh && tail -f /dev/null
defaultmeta.txt deleted
@@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
1 -publisher: Paris Astronomical Data Centre  
2 -publisherID: ivo://vopdc.obspm  
3 -contact.name: PADC support team  
4 -contact.address: 77 av. Denfert Rochereau, 75014 Paris, FRANCE  
5 -contact.email: vo.paris@obspm.fr  
6 -contact.telephone: 0033140512082  
7 -creator.name: PADC  
8 -creator.logo: http://voparis-srv-paris.obspm.fr/logos/PADC_small.png  
9 -authority.creationDate: 2012-01-09T12:53:33  
10 -authority.title: Paris Astronomical Data Centre Authority  
11 -authority.shortName: PADC  
12 -authority.description: The Paris Astronomical Data Centre project aims at providing VO access to its databases ressources, at participating to international standards developments, at implementing VO compliant simulation codes, data visualization and analysis software. This Naming Authority is used to identify the resources provided by Paris Astronomical Data Centre at Observatoire de Paris, Paris, FRANCE  
13 -authority.referenceURL: http://padc.obspm.fr  
14 -authority.managingOrg: ivo://vopdc  
15 -organization.title: Observatoire de Paris  
16 -organization.description: Founded in 1667, the Observatoire de Paris is the largest national research center for astronomy.  
17 -organization.referenceURL: http://www.obspm.fr  
18 -site.description: The Paris Astronomical Data Centre project aims at providing VO access to its databases ressources, at participating to international standards developments, at implementing VO compliant simulation codes, data visualization and analysis software.  
19 -  
docker-compose.yml
@@ -19,9 +19,10 @@ services: @@ -19,9 +19,10 @@ services:
19 dockerfile: dachs-dockerfile 19 dockerfile: dachs-dockerfile
20 args: 20 args:
21 - "VERSION=${VERSION}" 21 - "VERSION=${VERSION}"
  22 + - "INSTITUTION=${INSTITUTION}"
22 - "SERVER=${SERVER}" 23 - "SERVER=${SERVER}"
23 - "GITURL=${GITURL}" 24 - "GITURL=${GITURL}"
24 - - "GIT=${GIT}" 25 + - "PUBKEY=${PUBKEY}"
25 secrets: 26 secrets:
26 - source: id_rsa 27 - source: id_rsa
27 secrets: 28 secrets:
gavo.rc deleted
@@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
1 -[general]  
2 -rootDir: /var/gavo  
3 -maintainerAddress: pierre.lesidaner@obspm.fr  
4 -[web]  
5 -bindAddress:  
6 -serverPort: 80  
7 -#serverURL: http://145.238.197.199:81  
8 -serverURL: http://127.0.0.1:80  
9 -sitename: portablelp  
10 -corsOriginPat: http.*  
11 -logFormat: combined  
12 -[ivoa]  
13 -authority: vopdc.obspm