Commit 839767b2 authored by Cyril Rohr's avatar Cyril Rohr
Browse files

fixed typos in README

parent e0a98ea7
=== Synopsis ===
== Synopsis ==
The reference data is stored in a Git repository as JSON files, organized into hierarchical folders. These files can be manually written but the Git repository comes with a "/generators" folder which contains a script to ease their generation, based on high-level description files written in Ruby. Given one or more input files that describe the data you want to add, it will generate the required JSON files, directories and hard links.
The general overview of the workflow between git repositories is as follows:
......@@ -13,34 +13,37 @@ The general overview of the workflow between git repositories is as follows:
| |
API REPOSITORY <--| |--> API REPOSITORY
Each site administrator must first clone the remote MASTER REPOSITORY located on the wsdev3.rennes.grid5000.fr server and store it on a local machine (this has to be done once):
Each site administrator must first clone the remote MASTER REPOSITORY located on the wsdev3.rennes.grid5000.fr server and store it on a local machine (this is what I call the ADMIN REPOSITORY and has to be done once):
g5kadmin@host:/somewhere$ git clone ssh://g5kadmin@wsdev3.rennes.grid5000.fr/srv/git/reference-repository.git
When there is a need for change, the site administrator PULLs from the MASTER REPOSITORY to get the latest changes:
g5kadmin@reference-repository: git pull
g5kadmin@reference-repository: git pull
Then she manually adds/edits/removes the raw JSON files or uses the generator (more on that later). When she's done, she COMMITs her changes and PUSHes them to the MASTER REPOSITORY:
... editing ...
g5kadmin@host:/somewhere/reference-repository$ git commit -a -m "list of modifications"
g5kadmin@host:/somewhere/reference-repository$ git push
Finally, these changes are automatically replicated every minute to the repositories used by the Reference API.
Finally, these changes are automatically replicated every minute to each API REPOSITORY (one per site), that are used by the Reference API.
=== Getting started ===
== Getting started ==
First, clone the remote MASTER REPOSITORY if it is not already done:
g5kadmin@host:/somewhere/reference-repository$ git clone ssh://g5kadmin@wsdev3.rennes.grid5000.fr/srv/git/reference-repository.git
Right now, the easiest way to get started is to look at some existing input files in the "generators/input" directory. There you can see how you can define sites, clusters, nodes and environments programmatically. Then you can create a new file or change an existing one and run it in simulation mode:
g5kadmin@host:/somewhere/reference-repository$ ruby generators/grid5000.rb generators/input/*.rb -s
Right now, the easiest way to get started is to look at some existing input files in the "generators/input" directory. There you can see how you can define sites, clusters, nodes and environments programmatically. Then you may create a new input file or change an existing one and run it in simulation mode:
g5kadmin@host:/somewhere/reference-repository$ ruby generators/grid5000.rb generators/input/*.rb -s
or, if you want to explicitly specify the input files:
g5kadmin@host:/somewhere/reference-repository$ ruby generators/grid5000.rb generators/input/input-file1.rb generators/grid5000.rb generators/input/input-file2.rb -s
Your changes won't be applied but you'll see what would have been changed. Thus, the simulation mode is useful to review your changes before committing and check the ruby syntax of the input files.
When you are happy with your changes, you can then run the command without the -s flag:
g5kadmin@host:/somewhere/reference-repository$ ruby generators/grid5000.rb generators/input/*.rb
=== Apply your changes to the master repository ===
== Apply your changes to the master repository ==
After each modification to the repository, you should immediately commit your changes with a meaningful message, so that people can easily understand what has changed. Your commits should also be site-specific, or even cluster-specific to avoid merge conflicts. Try to avoid putting a lot of changes in only one commit.
Since users will make queries such as: "give me the description of that site at this date", the time between the date of the commit and the effective replication of the changes to the APIs must be as low as possible.
That's why, right after your commit, you should push your changes to the remote master repository. Please not that commits whose committed date is older than 60 seconds will be rejected (please check that your system clock is correctly synchronized with a time server).
Modifications are replicated every minute to the APIs.
=== Authors ===
Currently, modifications are replicated every minute to the APIs.
== Authors ==
Cyril Rohr, cyril.rohr@irisa.fr
\ No newline at end of file
......@@ -20,10 +20,10 @@ usage = %{
simulation_mode = !$*.delete("-s").nil?
if $*.empty?
puts usage
exit 1
exit -1
elsif ($*.map{|file| File.exists?(file) && File.extname(file) == ".rb"}.include? false)
puts "Error: your input files do not exist or are not ruby files (.rb extension)."
exit 1
exit -1
else
description_files = $*
puts "[Input files:\t\t #{description_files.join(", ")}]"
......
Markdown is supported
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