Skip to content

Conversation

benloh
Copy link
Collaborator

@benloh benloh commented Jun 21, 2025

There's a new branch deploy.

  • The deploy branch is used in CI/CD workflows to automatically deploy/redeploy changes to DigitalOcean droplets.
  • The branch should always be runnable. Any active droplet may be redeployed at any point in time, so the branch needs to be stable and runnable. Thorough testing is required before merging into deploy.
  • It is used in concert with nc-multiplex and netcreate-deploy-do repos to manage deployments.
  • The deploy branch is protected and cannot be deleted.
  • See corresponding changes in netcreate-deploy-do in the v0.4 branch caf40d4

New Features

  • Secure Web Sockets
    • In order to support HTTPS on DigitalOcean droplets, web sockets needed to also be secure.
    • client-network.js now supports secure web sockets. If https is detected in the URL, then websocket traffic is now directed to wss://<url>/ws_port/<port> instead of ws://<url>:<port>.
    • See corresponding changes in nc-multiplex in the deploy branch #18.

Fixes

  • npm run package fixes
    • npm run package had been broken -- if you run package on a first install without first running nc.js, the app-config/netcreate-config.js would be missing and no default template would be available in runtime/_default.template.toml. This would result in a silent failure during package, and the code would not be compiled. Trying to run nc-multiplex after this would result in broken graphs (telltale error: missing Net.Create logo).
    • There's a new script init-netcreate-config.js that will create a netcreate-config.js file and copy the default template to the runtime folder. This essentially emulates the behavior of the nc.js script in a non-blocking manner so the rest of the deployment process can run unattended. This script is run by the new start-nc-multiplex-ssl.sh script. See #18.
    • The fix also involves commenting out UDB.WriteDbJSON calls in brunch-config.js. These were ancient calls that were used to create databases from JSON definitions, but it assumed an existing .loki file. Since a .loki file does not exist in a first run, the call would fail and the rest of the compilation process would stop prematurely. This probably should be reviewed and removed eventually.
    • This fix was necessary for automated droplet provisioning.

This is based on the working dev-dhi branch: 99e4897

benloh added 3 commits June 13, 2025 16:46
…O `bootstrap.sh` script can spin up new droplets
…not being used and fails silently if a loki file was not previously defined
…d of `:port`. Use with netcreate-deploy-do nginx-ssl.conf.j2
@benloh benloh changed the title Feature: Deploy Feature: Deploy & SSL Jun 21, 2025
@benloh benloh merged commit 98a41cd into deploy Jun 21, 2025
@benloh benloh deleted the dev-bl/deploy-test branch July 22, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant