Deploy Software on Theia This presentation aims to demonstrate how to deploy a software release on a SlapOS Theia. The process can be used for any software available on the SlapOS repository. Note, that the SlapOS Theia is an extensible platform to develop multi-language Cloud & Desktop IDEs with state-of-the-art web technologies. Instantiating a SlapOS thus means, creating a smaller encapsulated system for then deploying another software inside. This is a useful approach for developing or hosting simple software releases. Table of Content Before You Start Deployment of Software Release: helloworld (1/4) slapos supply [software] [node] (2/4) slapos node software (3/4) slapos request "instance_name" [software] (4/4) slapos node instance We’ll show how to deploy a "helloworld" software release on a SlapOS Theia in this presentation. We will clarify the prerequisites in order to start the presentation. Then, we progress to show the steps to deploy "helloworld" software release on SlapOS Theia. Before you start Prepare For The Deployment of Software on Theia This deployment tutorial is based on Prepare For The Deployment of Software on Theia. You are expected to finish the last tutorial and have your software located on SlapOS Theia to get started. Deploy Helloworld Software (1/4) slapos supply [software] [node] (2/4) slapos node software (3/4) slapos request "instance_name" [software] (4/4) slapos node instance From terminal, we can use slapos command line. To deploy a software, we should basically type these 4 commands. Don't be afraid of these strange commands. You will understand how it works practically through the 4 steps in a quarter. The information below may help you: Client commands(slapos supply, slapos request) talking to the master and setting configuration for a node Node commands(slapos node) talking to the master and asking for the configuration There is also an Understanding SlapOS Architecture you can refer to (1/4) slapos supply [software] [node] slapos supply: supply a software to a node. slapos supply $PWD/slapos/software/helloworld/software.cfg local In our case, the software is helloworld, located in /srv/slapgrid/slappart49/srv/project/slapos/software/helloworld/software.cfg, for example. The path can be copied by right-clicking the exact file (software.cfg) -> Copy Path. And Node is named local here. You could either type slapos supply $PWD/slapos/software/helloworld/software.cfg local in your terminal, or replace $PWD/slapos/software/helloworld/software.cfg with the full path of the software.cfg of helloworld (something like slapos supply /srv/slapgrid/slappartX/srv/project/slapos/software/helloworld/software.cfg local). (1/4) slapos supply [software] [node] Software Supplied! When you get a similar result on your terminal, helloworld software is supplied to local. (2/4) slapos node software slapos node software: run software installation/deletion Command line: slapos node software or Terminal -> Run Task : slapos node software You can run slapos node software in Terminal to install the software. Or there is a task configured with the same label (Terminal -> Run Task, if there is an error, hit Run task again). Note: slapos node software will install everything for the instance. Your instance will be deployed totally from the software installation. (2/4) slapos node software Task is building in terminal Task starts the build in a new terminal. If you close that terminal process will be terminated. Once saved the deployment of the software will begin. Deployment can take anywhere from a few minutes (simple software, already compiled) to several hours. The log will inform of any errors or warnings encountered during deployment. (2/4) slapos node software Connection Error Sometimes external errors such as network errors happen and in that case we can retry software. (2/4) slapos node software Software installed! By re-run the task, you can have your software successfully. Now we can say, we have prepared everything from the software configuration file, and it can be used for instantiating a instance without network. Before have the instance with helloworld software, we are supposed to request an instance firstly. (3/4) slapos request "instance_name" [software] slapos request: request an instance and get status and parameters of instance Enter the following commands in your terminal to start requesting: slapos request "hello world instance" $PWD/slapos/software/helloworld/software.cfg Once the software installed as the result of the last step, you can request instance with slapos request in your terminal. “instance_name” is up to you, and [software] depends on where the software configuration of the software are. (3/4) slapos request "instance_name" [software] Instance requested! request is also the command to get parameters from a service and create the service even if it’s not yet created. You might need this information for your next tutorial. (4/4) slapos node instance slapos node instance: run instance deployment Command line: slapos node instance or Terminal -> Run Task : slapos node instance Now we come to the last step of deployment. After have an instance requested, you can run slapos node instance in Terminal to instantiate your software. Or there is a task configured with the same label (Terminal -> Run Task, if there is a connection error, hit Run task again) (4/4) slapos node instance Software applied to instance! Congrats! The helloworld software has been deployed. You might want to verify the deployment. We will inspect the services and relevant connection parameters in the next tutorial. Thank You Nexedi SA 147 Rue du Ballon 59110 La Madeleine France nexedi.com/contact