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 netcreate-itest 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

  • Custom nc-multiplex port
    • In previous versions, the nc-multiplex express server runs on port 80, redirecting traffic to other running graphs on ports 3000+ and 4000+. In order to support HTTPS, we need to add an NGINX reverse proxy that initially runs on port 80 to validate the LetsEncrypt certbot, then afterwards support redirecting port 443 to the nc-multiplex express server. This means the express server needs to run on a different port.
    • There is a new parameter --port=xxxx to define a custom port to use when starting nc-multplex, e.g. ./nc-multiplex.js --port=8080.
      • Any port can be used outside of the range 3000-4999, which are reserved for use by the express server.
      • If no port is specified, DEFAULT_PORT port 80 is used.
    • There's a new script start-nc-multiplex-ssl.sh that starts multiplex on port 8080. This is referenced by the NCPLEX_PORT variable in the netcreate-deploy-do create_droplet_ansible_docker.yml action. See NCPLEX_PORT:53
      • Ultimately that port is mapped to the nginx-ssl.conf.j2 file that routes port 443 traffic to the app running on the express server.
  • 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 netcreate-itest in the deploy branch #404

@benloh benloh changed the title Feature: Deploy Feature: Deploy & SSL Jun 21, 2025
…an just through 4030) in case PROCES_MAX changes.
@benloh benloh merged commit ee20fb7 into deploy Jun 21, 2025
@benloh benloh deleted the deploy-do branch July 9, 2025 17:34
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