Note: from Nov 2021, this page is deprecated. See Deployment of a VO Server with Docker |
---|
This part will use the classical procedure define in the DaCHS implementation to fill the two configuration files (gavo.rc and defaultmeta.txt) EPN-TAP Server Installation for VESPA Data Provider Tutorial. Also replace the logos respecting the size for big and medium. Using Docker container instead of virtual box is more easy and quicker to install and may allow your IT service to publish your data without managing an Debian server.
- First install Docker on your machine :
As Docker is a container system in constant evolution, get the current version in the official site adapted to your operating system and follow the installation procedure . https://docs.docker.com/install/ - We will use the Docker image done by Carlos Brandt available on Docker hub, then we will use another Docker for the statistc of usage (Awstat).
- To be able to have persistent storage of the config files, the data and the logs we will use Docker volume storage on your hard disk. This proposed volume come with a very simple exemple of Vespa service containing physical constant of the solar system planet's. all these files are inside the docker_kit.zip docker_kit.zip. Unzip it in the my_path directory.
- edit the gavo.rc file in the directory gavoetc (replace with you personal info)
[general]
rootDir: /var/gavo
maintainerAddress: pierre.lesidaner@obspm.fr
[web]
bindAddress:
serverPort: 80
serverURL: http://127.0.0.1:80
sitename: portablelp
corsOriginPat: http.* (to allow cross plateform for javascript)
logFormat: combined (to allow ip address in logs for awstats)
[ivoa]
authority: vopdc.obspm (this is your naming authority ID used in the registry) - edit the defaultmeta.txt file in the directory gavoetc (replace with you personal info)
publisher: Paris Astronomical Data Centre
publisherID: ivo://vopdc.obspm
contact.name: PADC support team
contact.address: 77 av. Denfert Rochereau, 75014 Paris, FRANCE
contact.email: vo.paris@obspm.fr
contact.telephone: 0033140512082
creator.name: PADC
creator.logo: http://voparis-srv-paris.obspm.fr/logos/PADC_small.png
authority.creationDate: 2012-01-09T12:53:33
authority.title: Paris Astronomical Data Centre Authority
authority.shortName: PADC
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
authority.referenceURL: http://padc.obspm.fr
authority.managingOrg: ivo://vopdc
organization.title: Observatoire de Paris
organization.description: Founded in 1667, the Observatoire de Paris is the largest national research center for astronomy.
organization.referenceURL: http://www.obspm.fr
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. - To launch the Docker and export the volume use command line, If you have an application running on your laptop using port 80 (like apache), you may close it. replace my_path by the path where the files are
sudo docker run -it -p 80:80 --volume my_path/mydisk/planets:/var/gavo/inputs/planets --volume my_path/logs/:/var/gavo/logs/ --name mydachs chbrandt/dachs:latest Then, from outside Dachs (i.e.: do it from another terminal window) you have to copy files from your local storage to the Docker container
sudo docker cp my_path/gavoetc/gavo.rc mydachs:/etc/gavo.rc
sudo docker cp my_path/gavoetc/defaultmeta.txt mydachs:/var/gavo/etc/defaultmeta.txt
sudo docker exec -it mydachs mkdir -p /var/gavo/web/nv_static/img
sudo docker cp my_path/img/logo_big.png mydachs:/var/gavo/web/nv_static/img/logo_big.png
sudo docker cp my_path/img/logo_medium.png mydachs:/var/gavo/web/nv_static/img/logo_medium.pngTo launch Postgres and install the service planets as a first example and launch DaCHS
sudo docker exec -it mydachs /etc/init.d/postgresql restart
sudo docker exec -it --user dachsroot mydachs gavo imp planets/q
sudo docker exec -it --user dachsroot mydachs gavo pub //services
sudo docker exec -it --user dachsroot mydachs gavo pub //tap
sudo docker exec -it --user dachsroot mydachs gavo pub planets/q
sudo docker exec -it mydachs gavo serve restartThen simply type 127.0.0.1 in your browser to access your Dachs server.
To reopen a session after login out: sudo docker exec -it mydachs bash
Now make a container with AWSTATS from a debian container. Make sure you have adapted the two config files of awstats and apache ( my_path/conf/awstats.dachs.conf and my_path/conf/25-myserver.mydomain.conf
- Make the stats run on the container
sudo docker cp mypath/conf/run_awstats myawstats:/etc/cron.daily/run_awstats sudo docker exec -it myawstats chown root:root /etc/cron.daily/run_awstats sudo docker exec -it myawstats chmod 777 /etc/cron.daily/run_awstats sudo docker exec -it myawstats /etc/cron.daily/run_awstats sudo docker exec -it myawstats a2enmod cgi sudo docker exec -it myawstats /etc/init.d/apache2 restart |
---|
To see if it works try to open a browser with first 127.0.0.1 to see DaCHS main page, and after http://127.0.0.1:8080/cgi-bin/awstats.pl?output=alldomains&config=dachs&framename=index