Commit 42b25bd8 authored by Luca Cinquini's avatar Luca Cinquini
Browse files

Adding documentation on CoG container.

parent ba629364
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 4d3597b4651c71301cf359fad5392948
config: 5181bd2b8280e663a350317fc93a53af
tags: 645f666f9bcd5a90fca523b33c5a78b7
+10 −2
Original line number Diff line number Diff line
@@ -38,6 +38,14 @@ Remove all volumes::

  docker image ls -q | xargs docker image rm --force

Remove image according to a given pattern::
Remove image according to a given pattern (e.g. the esgfhub devel images)::

  docker images "esgfhub/*:devel" -q | xargs docker image rm

Remove imges tagged "<none>"::

  docker image ls | grep "^<none>" | awk '{print $3}' | xargs docker image rm --force

Inspect the contains of an image (esgfhub/esgf-http:devel image)::

  docker run --rm -it --entrypoint=/bin/bash esgfhub/esgf-http:devel
 No newline at end of file

_sources/esgf_cog.txt

0 → 100644
+63 −0
Original line number Diff line number Diff line
***************
esgf-cog Image
***************

This document contains miscellaneous details on how the *esgf-cog* Docker container is configured and operated.

In the following, the environment variable *ESGF_VERSION* must be set to the desired image version, for example::

  export ESGF_VERSION=latest

Starting the container
======================

To pre-download the CoG image::

  docker pull esgfhub/esgf-cog:${ESGF_VERSION}

To start the container standalone::

  docker run -ti -p 8000:8000 --name cog esgfhub/esgf-cog:${ESGF_VERSION}

* will run CoG through the Django development server, running on port 8000
* will use hostname=localhost
* will skip ESGF setup, i.e. it will use a sqllite database (not the ESGF postgres database), and will not install any ESGF configuration files
* CoG will be accessible at the URL: http://localhost:8000/
* will need to login at the URL: http://localhost:8000/login2/ with the default username ("rootAdmin") and password ("changeit")

To start the container standalone, but using a specific hostname::

  docker run -ti -p 8000:8000 --name cog -e ESGF_HOSTNAME=${ESGF_HOSTNAME} esgfhub/esgf-cog:${ESGF_VERSION} ${ESGF_HOSTNAME} false true

* CoG will be accessible at the URL: http://${ESG_HOSTNAME}:8000/

To start the container standalone, but using source code from a local directory, for development purposes::

  docker run -ti -p 8000:8000 --name cog -v ${COG_INSTALL_DIR}:/usr/local/cog/cog_install esgfhub/esgf-cog:${ESGF_VERSION}

* for example ${COG_INSTALL_DIR}=/Users/cinquini/Documents/workspace/cog
* will again use hostname=localhost
* will again run CoG through the Django server

To run CoG as part of the ESGF software stack, with postgres database and Apache front-end::

  # initialize the $ESGF_CONFIG directory containing all ESGF node configuration
  cd .../esgf-docker
  scripts/esgf_node_init.sh

  # start CoG and its dependency containers
  docker-compose up esgf-cog esgf-postgres esgf-httpd

* will run CoG within the Apache httpd server (and container) through mod_wsgi
* the cog container is kept running as a data container, exposing the CoG source directory *COG_INSTALL_DIR=/usr/local/cog/cog_install* to the httpd container

After the first startup, the containers can be restarted without re-initializing them as such::

  export INIT=false
  docker-compose up -d esgf-postgres
  docker-compose up esgf-cog esgf-httpd

To run the full ESGF software stack::
  
  cd .../esgf-docker
  docker-compose up
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ Table of Contents:
   docker_swarm_setup_on_linux.rst
   versioning_guideline.rst
   git_workflow.rst
   esgf_cog.rst
   esgf_solr.rst
   testing_guide.rst
   docker_tips.rst
+25 −58
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 *
 * Sphinx stylesheet -- basic theme.
 *
 * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
 * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
 * :license: BSD, see LICENSE for details.
 *
 */
@@ -52,8 +52,6 @@ div.sphinxsidebar {
    width: 230px;
    margin-left: -100%;
    font-size: 90%;
    word-wrap: break-word;
    overflow-wrap : break-word;
}

div.sphinxsidebar ul {
@@ -85,6 +83,10 @@ div.sphinxsidebar #searchbox input[type="text"] {
    width: 170px;
}

div.sphinxsidebar #searchbox input[type="submit"] {
    width: 30px;
}

img {
    border: 0;
    max-width: 100%;
@@ -122,8 +124,6 @@ ul.keywordmatches li.goodmatch a {

table.contentstable {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

table.contentstable p.biglink {
@@ -151,14 +151,9 @@ table.indextable td {
    vertical-align: top;
}

table.indextable ul {
table.indextable dl, table.indextable dd {
    margin-top: 0;
    margin-bottom: 0;
    list-style-type: none;
}

table.indextable > tbody > tr > td > ul {
    padding-left: 0em;
}

table.indextable tr.pcap {
@@ -190,22 +185,8 @@ div.genindex-jumpbox {
    padding: 0.4em;
}

/* -- domain module index --------------------------------------------------- */

table.modindextable td {
    padding: 2px;
    border-collapse: collapse;
}

/* -- general body styles --------------------------------------------------- */

div.body p, div.body dd, div.body li, div.body blockquote {
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}

a.headerlink {
    visibility: hidden;
}
@@ -231,6 +212,10 @@ div.body td {
    text-align: left;
}

.field-list ul {
    padding-left: 1em;
}

.first {
    margin-top: 0 !important;
}
@@ -347,6 +332,10 @@ table.docutils td, table.docutils th {
    border-bottom: 1px solid #aaa;
}

table.field-list td, table.field-list th {
    border: 0 !important;
}

table.footnote td, table.footnote th {
    border: 0 !important;
}
@@ -383,20 +372,6 @@ div.figure p.caption span.caption-number {
div.figure p.caption span.caption-text {
}

/* -- field list styles ----------------------------------------------------- */

table.field-list td, table.field-list th {
    border: 0 !important;
}

.field-list ul {
    margin: 0;
    padding-left: 1em;
}

.field-list p {
    margin: 0;
}

/* -- other body styles ----------------------------------------------------- */

@@ -447,6 +422,15 @@ dl.glossary dt {
    font-size: 1.1em;
}

.field-list ul {
    margin: 0;
    padding-left: 1em;
}

.field-list p {
    margin: 0;
}

.optional {
    font-size: 1.3em;
}
@@ -505,13 +489,6 @@ pre {
    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
}

span.pre {
    -moz-hyphens: none;
    -ms-hyphens: none;
    -webkit-hyphens: none;
    hyphens: none;
}

td.linenos pre {
    padding: 5px 0px;
    border: 0;
@@ -548,11 +525,11 @@ div.code-block-caption span.caption-number {
div.code-block-caption span.caption-text {
}

div.literal-block-wrapper {
div.container {
    padding: 1em 1em 0;
}

div.literal-block-wrapper div.highlight {
div.container div.highlight {
    margin: 0;
}

@@ -603,16 +580,6 @@ span.eqno {
    float: right;
}

span.eqno a.headerlink {
    position: relative;
    left: 0px;
    z-index: 1;
}

div.math:hover a.headerlink {
    visibility: visible;
}

/* -- printout stylesheet --------------------------------------------------- */

@media print {
Loading