Skip to content

Commit

Permalink
README omitted earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
travula committed Jul 24, 2015
1 parent 821681d commit 6ee3bc4
Showing 1 changed file with 129 additions and 0 deletions.
129 changes: 129 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
* Settings for ADS
Execute the following steps, to configure and then run ADS as a service:

** Edit the =ovpl/config/= directory
Copy =ovpl/config/sample_config.json= to =ovpl/config/config.json= and make
the following changes:

+ To set the proxies.
#+begin_src example
"ENVIRONMENT": {
"HTTP_PROXY":"http://proxy. vlabs.ac.in:8080",
"HTTPS_PROXY":"http://proxy.vlabs.ac.in:8080"
},
#+end_src

+ if no proxies are used,
#+begin_src example
"ENVIRONMENT": {
"HTTP_PROXY":"",
"HTTPS_PROXY":""
},
#+end_src


+ Set the SERVER_IP in LOGSERVER_CONFIGURATION to the IP address of the
machine on which the ADS services are running.
#+begin_src example
"LOGSERVER_CONFIGURATION": {
"SERVER_IP": "ads-server-private-ip",
},
#+end_src

+ Set the COOKIE_SECRET value in CONTROLLER_CONFIG to some long randomly
generated string.

#+begin_src example
"COOKIE_SECRET": "<generate a long random UUID>",
#+end_src

+ Leave the PERSONA_VERIFIER field as it is, if you are using the Mozilla's
default Persona provider service.

+ Change APP_URL field and put the URL where the application is hosted.
#+begin_src example
"APP_URL": "http://ads-server-public-ip:8080",
#+end_src

+ Choose =POOLID= and =ADAPTERID= from =VPOOLS= section. Make the appropriate change in =ADAPTER_TO_USE=.
The =ADAPTERID= for =aws_adapter=, =centos_openvz_adapter= and =centos_bridged_adapter= is 1, 2 and 3
respectively.

#+begin_src example
"ADAPTER_TO_USE" : {"POOLID" : 1, "ADAPTERID" : 2}
#+end_src

** Identify =authorized_users=
Copy =config/sample_authorized_users.py= to =config/authorized_users.py=,
and add actual email addresses of authorized users.

** Settings for =base_config=
1. Copy =config/adapters/sample_base_config.py= to =config/adapters/base_config.py=.
For =aws_adapter=, no change in this file has to be done. For =centos_openvz_adapter=
and =centos_bridged_adapter= make the following changes in the file:

1. If the services are running on the base machine,
set =ADS_ON_CONTAINER= to False.

2. If the services are running on a container, set =ADS_ON_CONTAINER= to True.

3. Set BASE_IP_ADDRESS = "root@<IP>" where IP is the ip address of
base machine on which containers are created.

4. Set ADS_SERVER_VM_ID to CTID of container running ADS.
ADS_SERVER_VM_ID = "<CTID>"

5. SUBNET field to match with the subnet of your base machine
If the ip address of your base machine is 10.2.58.XXX,
SUBNET = ["10.2.58.12/28"]

** Settings for =centos_bridged_adapter=
Copy =config/adapters/sample_centos_bridged_config.py= to =config/adapters/centos_bridged_config.py=,
and change the =SUBNET_BRIDGE= in the file.

** Settings for =centos_openvz_adapter=
Copy =config/adapters/sample_centos_openvz_config.py= to =config/adapters/centos_openvz_config.py=.

** Settings for =aws_adapter=
Copy =config/adapters/sample_aws_config.py= to =config/adapters/aws_config.py=, and edit the values
accordingly. The private key =key_file_name.pem= should be copied inside =src/= directory.
See [[./docs/AWSAdapter.org][here]] for more details.

** Commands to Manage the Service
+ As root, go into =ovpl= directory and run =manage_services.sh= file:
#+begin_src example
$ cd ovpl
$ ./manage_services (or) ./manage_services start
#+end_src

+ To stop the services
#+begin_src example
$ cd ovpl
$ ./manage_services stop
#+end_src

+ To stop or start specific service use =./manage_services.sh [action] [services]=
- [action] = start (or) stop
- [services] = LOGGER (or) ADAPTER (or) CONTROLLER
#+begin_src example
$ cd ovpl
$ ./manage_services.sh start LOGGER
#+end_src

+ For more help use =./manage_services.sh --help=.

+ View the logs at /root/logs/ovpl.log by
#+begin_src example
tail -f /root/logs/ovpl.log
#+end_src

+ Open the location =http://ads-server-public-ip:8080= from the browser and provide the lab
id and lab sources url.


** Other related documentation:
Steps to manually create a container
-----
1. vzctl create 101 --ostemplate ubuntu-12.04-custom-x86_64 --ipadd 10.2.58.3 --diskspace 10G:15.0G --hostname cse02.vlabs.ac.in
2. vzctl start 101
3. vzctl set 101 --nameserver inherit --ram 256M --swap 512M --onboot yes --save

0 comments on commit 6ee3bc4

Please sign in to comment.