Sequence Deployment
Deploy one of the demo Transform Sequence programs
-
Download the repository
git clone [email protected]:scramjetorg/scramjet-cloud-docs.git
-
Go to simple-counter-sample directory
cd samples/simple-counter-js
-
Install dependencies and go back to the samples directory
npm install && cd ../
-
Deploy the Transform Sequence program
si seq deploy simple-counter-js
-
See the output form Sequence Instance process
si inst stdout <sequence-id>
-
View the Instance List
Write your own Transform Sequence from template
-
Download the repository
git clone [email protected]:scramjetorg/scramjet-cloud-docs.git
-
Choose the template
Templates allow you to apply predefined settings to start building your own applications. Depending on the needs please choose form:
-
JavaScript (Node.js)
-
TypeScript (ts-node)
-
-
Make the template copy and write a Sequence
cp -r templates/template-js/ samples/<sequence-name> && cd ../samples/<sequence-name>
To write a Sequence please referee to the App Reference
-
Deploy the Sequence
si seq deploy <sequence-name>
Pack, Send, Run
Instead of deploying, you are allowed to run your Sequence step by step. Deploy can be devided to three separate steps: packing, sending and running.
-
Pack the Sequence
Packaging the sequence is nothing else than packaging all the program files, including the dependencies and potentially also some binaries in a
tar.gz
file. While a simpletar -czf package.tar.gz .
would work just as well,si
provides a simple shorthand for this.si seq pack <sequence-name>
-
Send the Sequence
Sending the sequence means that you upload the prepared
tar.gz
file to the platform. When you do so, the platform checks the contents of the file, identifies the runtime needed to run (ex.py
programs are run withpython
), and prepare the hub for execution of said platform.si seq send <sequence-name> # alternatively - param will send the last packaged sequence si seq send -
-
Run the Sequence
Running the Sequence is exactly the same as running a script on your own computer. The main function of your Sequence is called by a runner program in a container with the correct runtime identified in the previous step. Once the function is running you can manipulate it using
si
commands or the API.si seq run <sequence_id> # alternatively - param will run last sent Sequence si seq run -
Didn't find information needed?
Join our Scramjet Community on Discord, where you can get help from our engineers directly.