# Author: Martti Vasar
# Date: 08/03/2012
#
# These commands are triggered, when configuring NGINX servers. If you want to add commands,
# just write them here, if you want to remove, you can delete the line or use # comment mark,
# the program will ignore comment lines
#
# There are two command types, one is running the command in the instance (R), the other is 
# copying files from local (from this) machine to remote machine (C). For running commands, use
# R as an indicator and for copying, use C as an indicatior. If using C, make sure you do 
# not use spaces in file names, first is where the file is located in the local file system
# and the second is where to copy the file in the remote system.
#
# It uses Secure Shell tools (scp and ssh)
# The PWD (current directory) is the directory, where the CloudController is started.
# Configuration files are located in configuration/.

# Description:
# nginx.conf is used as templated and modified version is called nginx.conf.modified, that
# includes list of servers marked as Apaches, that are added by the program and when, 
# the configuration part is done, it should load balance traffic to the back end servers 
# defined in the upstream list.

# make enough rights to be able to copy nginx configuration (run the command)
R sudo chmod 777 /etc/nginx/nginx.conf

# copy configuration file, use modified version of the nginx (use copy command)
C configuration/nginx.conf.modified /etc/nginx/nginx.conf

# start NGINX server (run the command)
R sudo nginx

# if it was running, restart it
R sudo nginx -s reload

# close MYSQL (run the command)
R sudo service mysql stop

# feel free to remove or add new commands

