QuantRocket

Deployment request


#1

Hi Brian!

How about making all containers execute a bash script from codeload after deployment, just like you have quantrocket.satellite.pip.txt and quantrocket.satellite.apt.txt files? The script would receive a service name as a parameter or env variable to make conditional execution for different services. It is often needed to do additional installation steps on containers to work after each update or deployment. The life would be much easier if there was a way to automate this work in a script that is stored in codeload folder. Of cause we can always create new docker images, based on Quantrocket images, but having such script would be just so much easier.

Also, am I right in thinking that codeload service gets the code during deployment directly from git by using the GIT_URL variable? It would help tremendously useful if it was documented and if there was a way to change it. Then we would put all our quantrocket code in a private Github repository, set this repository URL and credentials in docker-compose.override.yml and deploy everything in one click, given the post-deploy script suggested above is also located in the codeload (thus this git repository).

So we would extend Quantrocket infrastructure by adding more services based on satellite service to the docker-compose.override.yml and specifying additional deployment steps in that post-deploy script suggested above?

Thank you for the great work!


#2

You can load from Git like this:

codeload:
    environment:
        GIT_URL: 'https://github.com/myuser/myrepo.git'
        GIT_BRANCH: 'master'
        GIT_USERNAME: 'myuser'
        GIT_PASSWORD: 'XXXXXXXXX'

You can make a single post-deploy script in that repo with all your post-deploy steps, executing the individual steps on the various satellite containers via quantrocket satellite exec with the --service option. Then, when you re-deploy, you have a single manual step of executing that one script. I think that’s probably a cleaner and more flexible approach than extending the quantrocket.satellite.pip/apt.txt convention.