henit-chobisa / Thrust.RC

Fastest, Lightest and Most Minimal path to RC Apps development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thrust Logo
thrust

Test Companion for Rocket.Chat Apps

Stop configuring your workspace everytime you wanna test Rocket.Chat Apps and waste the initial 20 mins of yours. Let thrust handle it, thrust downloads manages and runs container based on Rocket.Chat and Rocket.Chat apps, and sets up your Rocket.Chat App workspace under 1 minute,just place the binary in your directory and execute it. On launch it sets up everything which you would need and launches an RC Server and installs the app in that for you to test, making your life wayyyy easier that before.

Prerequisites

  • Docker in running state, that's it.
  • No need to even do npm install, thrust will take care of that

How to use it ? ( Linux only, mac would be there soon )

  • Start Docker
  • Download the binary using wget from github and provide executable permissions

Linux ( amd64 )

sudo wget -O - -c https://github.com/henit-chobisa/Thrust.RC/releases/download/v2.0.3/thrust.RC_2.0.3_Linux_amd64.tar.gz | sudo tar -xz -C /usr/local/bin && sudo mv /usr/local/bin/thrust.RC /usr/local/bin/thrust

Mac ( amd64 )

sudo wget -O - -c https://github.com/henit-chobisa/Thrust.RC/releases/download/v2.0.3/thrust.RC_2.0.3_Darwin_amd64.tar.gz | sudo tar -xz -C /usr/local/bin && sudo mv /usr/local/bin/thrust.RC /usr/local/bin/thrust
  • Now execute thrust using
thrust start <path to your app directory>

# ./thrust_linux start ./

Use mac binary if you're a mac user, That's it sit back & relax!

image

How it looks like ?

The execution will confirm the necessary assets which will be needed to run the apps companion, such as

  • Docker running or not
  • Are all the initial dependencies full filled
  • What images are present in the system and what to pull, it will pull the required images automatically don't worry

image

Next it will start necessary containers such as Rocket.Chat and mongodb using dockerd and wait until the container are fully started, it won't start a new container everytime you start, it will look for the running container and just create the ones which are not present. Along with that, it also creates an admin user for the initialised Rocket.Chat Server, which will later be helpful for installing the apps inside, you will soon have an option to configure everything manually with some flags and yaml files.


image

What would be the end result ?

In the end you can see the companion container's logs, which will show you two of the essential things,

  • Node Module Installation, which is done inside the container only, so you can expect a frest install everytime.
  • Rocket.Chat CLI logs

Using on EC2 Instance

Please have a look on this short manual for end to end configuration of your ec2 with Apps' conpanion.

Providing Custom Configuration

When Thrust Starts it creates a new configuration file .rc.yaml which is responsible for assisting Thrust with external configuration.

  • You can pass your custom environment variables for Rocket.Chat and MongoDB Externally
  • You can disable appMode, with this you can use thrust's capability of launching Rocket.Chat and MongoDB containers with any other dependent piece of Software.
  • You can pass your own administrator credentials for Thrust to use by default
admin:
    email: a@b.com
    name: user
    password: "123456"
    username: user0

appMode: true

env:
    RocketChat:
        - "OVERWRITE_SETTING_API_Enable_Shields=true" # dummy variable
        - "OVERWRITE_SETTING_API_Enable_Direct_Message_History_EndPoint=true" # dummy variable
    MongoDB:
        #  Some other configuration options

Have a look on Rocket.Chat User Documentation, for understanding more on overriding environment variables in Rocket.Chat.

debugging

  • Docker-Compose "executable file not found in $PATH"
sudo chmod +x /usr/local/bin/docker

Icon - Red
Made with ♥️ for Rocket.Chat Apps by Henit.Chobisa

Note

If you find any bug please open an issue, your contributions would be appreciated.

About

Fastest, Lightest and Most Minimal path to RC Apps development

License:MIT License


Languages

Language:Go 98.6%Language:Dockerfile 1.0%Language:Shell 0.4%