Skip to content

Commit

Permalink
docs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
iiman committed May 9, 2016
1 parent 5be0af4 commit 8c82763
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 32 deletions.
30 changes: 15 additions & 15 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Here, we create a virtual machine that runs docker.

- Run docker engine::

docker run hello-world
$ docker run hello-world


+ You will see a message similar to the one below::
Expand All @@ -62,12 +62,12 @@ Here, we create a virtual machine that runs docker.

- Run docker-compose::

docker-compose --version
$ docker-compose --version

+ The output will be ``docker-compose version x.x.x, build xxxxxxx``
+ For users with an older Mac, you will get ``Illegal instruction: 4``. This error can be fixed by upgrading docker-compose::

pip install --upgrade docker-compose
$ pip install --upgrade docker-compose


.. _linux_req:
Expand Down Expand Up @@ -103,21 +103,21 @@ Installation

3. Clone the ``docker-chiminey`` source code from http://github.com.au::

git clone https://github.com/chiminey/docker-chiminey.git
$ git clone https://github.com/chiminey/docker-chiminey.git


4. Change your working directory::

cd docker-chiminey
$ cd docker-chiminey


5. Setup a self-signed certificate. You will be prompted to enter country code, state, city, and etc::

sh makecert
$ sh makecert

6. Deploy the Chiminey platform::

docker-compose up -d
$ docker-compose up -d


7. Verify Chiminey was deployed successfully.
Expand Down Expand Up @@ -148,19 +148,19 @@ Here, we will configure the Chiminey deployment by creating a superuser, initial

2. Change to ``docker-chiminey`` directory::

cd docker-chiminey
$ cd docker-chiminey

3. Create a superuser::

./createsuper
$ ./createsuper

4. Initialise the database::

./init
$ ./init

5. Create a regular user::

./createuser
$ ./createuser

6. Verify the Chiminey platform is configured correctly.

Expand All @@ -178,11 +178,11 @@ When a Chiminey platform is deployed, each `smart connector <smart_connector_de

2. Change to ``docker-chiminey`` directory::

cd docker-chiminey
$ cd docker-chiminey

3. List all available smart connectors::

./listsc
$ ./listsc

NAME: DESCRIPTION
hrmclite: Hybrid Reverse Monte Carlo without PSD
Expand All @@ -192,7 +192,7 @@ When a Chiminey platform is deployed, each `smart connector <smart_connector_de

4. Activate a smart connector. The syntax to activate a smart connector is `./activatesc smart-connector-name`. Thus, activate `randnum` smart connector as follows::

./activatesc randnum
$ ./activatesc randnum

5. Verify the smart connector is successfully activated.

Expand All @@ -202,7 +202,7 @@ When a Chiminey platform is deployed, each `smart connector <smart_connector_de

- Click Create Job. `randnum` will appear under the Smart Connectors list.




.. seealso::
Expand Down
6 changes: 6 additions & 0 deletions docs/loginterm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**NB**: Login to the Chiminey docker container.

- For Mac OS X and Windows users, open `Docker Quickstart Terminal`. For linux-based OS users, login to your machine and open a terminal.

- Login to the chiminey docker container::
$ ./chimineyterm
19 changes: 6 additions & 13 deletions docs/quick_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ Quick Example: The Unix Random Number Smart Connector
=====================================================

In this example, we create a basic smart connector that generates two
random numbers on a unix machine (or the Chiminey server machine,
for simplicity), saves the numbers to a file, and then transfers the file
to a provided output location. This smart connector will be known as the
random numbers on a unix machine, saves the numbers to a file, and then transfers the file
to a provided output location. The unix machine must have ssh service enabled. This smart connector will be known as the
*Unix Random Number Smart Connector*.

- The **purpose** of this example is to create a basic smart connector that executes programs on a unix server. We also add an :ref:`external parameter sweep <external_parameter_sweep>` to this connector.
Expand All @@ -19,16 +18,10 @@ to a provided output location. This smart connector will be known as the
Requirements
------------

#. Installation and configuration of the Chiminey server on a virtual machine,
according to the :ref:`Installation Guide <installation_guide>`.
#. Registration of a computation platform, which is where the core
functionality of a smart connector is executed within the Chiminey
UI. For this example, the platform could be any unix server,
including the Chiminey server itself (see registering :ref:`Cluster/Unix Computation Platform <hpc_resource>`).
#. Registration of a storage platform, which is the destination of the
smart connector output within the Chiminey UI. As for the computation
platform above, the platform could be any unix server, again
including the Chiminey server itself (see registering :ref:`Unix Storage Platform <remote_storage>`).
#. :ref:`Install and configure <installation_guide>` the Chiminey platform.
#. Register an :ref:`HPC compute resource <hpc_resource>`. For this example, the HPC resource could be any unix server where ssh service is enabled,
including the Chiminey deployment itself.
#. Register a storage resource, specifically a :ref:`remote file system <remote_storage>`. Similar to the compute resource, the Chiminey deployment can be used a storage resource.


Creating the Unix Random Number Smart Connector
Expand Down
38 changes: 34 additions & 4 deletions docs/sc_create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ Creating a smart connector

Creating a smart connector involves completing three tasks:

#. providing the core functionality of the smart connector,
#. attaching resources and optional non-functional properties, and
#. registering the new smart connector with the Chiminey platform.
#. providing :ref:`the core functionality <sc_core_fcn>`` of the smart connector,
#. attaching :ref:`resources and optional non-functional properties <sc_attach_resources>``, and
#. :ref:`registering <sc_registration>` the new smart connector with the Chiminey platform.


Let's create a new smart connector that generates a random number with a timestamp, and then writes the output to a file.
Each tasks are discussed below by creating an example smart connector. This smart connector generates a random number with a timestamp, and then writes the output to a file.

.. include:: <loginterm.rst>



.. _sc_core_fcn:

The Core Function
""""""""""""""""

Expand All @@ -41,6 +44,8 @@ Notice ``OUTPUT_DIR``. This is the path to the output directory, and thus Chimin
The contents of ``OUTPUT_DIR`` will be transferred to the output location at the end of each computation.


.. _sc_attach_resources:

Attaching resources and non-functional properties
"""""""""""""""""""""""""""""""""""""""""""""""""""
Resources and non-functional properties are attached to a smart connector by overriding ``get_ui_schema_namespace`` method of ``chiminey.initialisation.coreinitial.CoreInitial`` class.
Expand All @@ -58,6 +63,31 @@ Under chiminey/, we create a python package `randnum`, and add ``initialise.py``
] return schemas
# ---EOF ---



.. _sc_registration:

Registration
"""""""""""""""

The final step is registering the smart connector with the Chiminey platform. The details of this smart connector
will be added to the dictionary ``SMART CONNECTORS`` in ``chiminey/settings changeme.py``.
The details include a unique name (with no spaces), a python path to ``RandNumInitial`` class,
the description of the smart connector, and the absolute path to the payload.

"randnum": {
"name": "randnum",
"init": "chiminey.randnum.initialise.RandNumInitial",
"description": "Randnum generator, with timestamp",
"payload": "/opt/chiminey/current/payload_randnum"
},

Finally, restart the Chiminey platform and then activate ``randnum`` smart connector. You need to exit the docker container and execute the following::

$ sh restart
$ ./activatesc randnum


The list
of available resources and non-functional properties is given by ``INPUT_FIELDS`` parameter in ``chiminey/settings_changeme.py``

Expand Down

0 comments on commit 8c82763

Please sign in to comment.