Guest User

Untitled

a guest
Jul 25th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. STARTING:
  2.  
  3. To start it, go to the main contextcubed directory (or where you put the cloudinit file) and type the follow command:
  4. ./cloudinit start
  5. To stop, you should use the same command using 'stop' instead of 'start'
  6. ./cloudinit stop
  7.  
  8. CLOUDCONFIG.XML
  9.  
  10. All the configuration of the system is specified at a file called cloudconfig.xml in the main system root. Here is its description:
  11.  
  12. user-data-config-file: write here all the specs the user will need to connect to the manager (roles, clustername, contextmanager ...). Note the clustername and the contextmanager tags are mandatory.
  13.  
  14. context-manager-username: the username to connect to the manager.
  15. context-manager-password: the username password to connect to the manager.
  16.  
  17. client-root: user cloud temporary dir (place where the scripts will be downloaded from the context manager)
  18.  
  19. client-scripts-directories: add here all the directories you want to be retrieved. You should inform only the relative path (/common, /foo). For the roles directory, you should explicit use the name 'roles' for the role directory.(<dir-name> roles <dir-name>)
  20.  
  21. <optional>
  22. bypass-directories: add here directories/files which you want not to be retrieved from the manager. For sub-directories use /main-dir/sub-dir (ex: /roles/foo). You can add as many directories you want. Note This also works for files, since you inform the full path of the file (/common/something/foo.txt). Do not use foo/* syntax for directories, simply uses foo/
  23.  
  24. <optional>
  25. remote-attempts: Number of attempts if any error has occurred when trying to retrieve files from the context manager. Default: 3
  26. sleep-time: Time to wait between the attempts.(should be informed in seconds). Default: 15
  27.  
  28. FIRSTBOOTS
  29.  
  30. If you want a script to be executed only once, you have a option to add the firstboot directory inside any one of the client directories listed on the config.xml file. For example, if you want a firstboot script to be executed inside a client specific role, you just need to create a firstboot directory there and add the script.
  31.  
  32. Ex: /common/firstboot/S21blabla
  33. /roles/mysql/firstboot/S77blabla
  34. /roles/apache/firstboot/S88blabla
  35.  
  36. Note everything inside a firstboot directory will be considered 'firstboot'. This means you can have subdirectories inside a firstboot directory.
  37.  
  38. Ex: /roles/mysql/firstboot/S77blabla
  39. /roles/mysql/firstboot/fix/S44fix_for_something
  40.  
  41. The control of the firstboot files is registered in a file called firstboot_scripts.yaml .There you will find all the firstboot scripts already executed and the path from where they were. Note you can change the status of a firstboot script from executed to not_executed again. This will allow that firstboot to be executed again on the next boot (This is fully responsability of the client).
  42.  
  43. Notes:
  44. - There will be only retrieved from the manager scripts from directories listed on the cloudconfig.xml file. Also will be retrieved only firstboot scripts which were not executed yet.
  45. - The system will only try to executed scripts which follow the standard specification for run-level scripts (S/K 1-99) like S1execute_me, K99finalize_me. On the startup process will be executed only scripts beginning by S (following their number runlevel order). On the other hand only scripts beginning by K will be executed on the shutdown process.
  46. - You can find a log for everything which is being retrieved/executed at /var/log/cft/contextcubed/contextcubed.log
  47. - When downloading larges files from the manager, if something happened which caused the loss of the connection, the system will try to re-connect after a amount of time specified on the cloudconfig.xml file and begin to download from the point which the connection was lost. If after a amount of attempts (also specified on the config.xml file) the system could not reconnect, it will leave the boot process.
Add Comment
Please, Sign In to add comment