Sequence Deployment

Scramjet Sequences

Deploy one of the demo Transform Sequence programs

  1. Download the repository

    git clone [email protected]:scramjetorg/scramjet-cloud-docs.git
  2. Go to simple-counter-sample directory

    cd samples/simple-counter-js
  3. Install dependencies and go back to the samples directory

    npm install && cd ../
  4. Deploy the Transform Sequence program

    si seq deploy simple-counter-js
  5. See the output form Sequence Instance process

    si inst stdout <sequence-id>
  6. View the Instance List

Write your own Transform Sequence from template

  1. Download the repository

    git clone [email protected]:scramjetorg/scramjet-cloud-docs.git
  2. 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)


  3. 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

  4. 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.

  1. 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 simple tar -czf package.tar.gz . would work just as well, si provides a simple shorthand for this.

    si seq pack <sequence-name>
  2. 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 with python), 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 -
  3. 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 -