5G-MAG / rt-5gms-application-provider

The 5GMS Application Provider interacts with the 5GMS Application Function via M1 Provisioning interface, and uses M8 interface to communicate with UE.
Other
2 stars 4 forks source link

Automated Linode deployment for production and staging #55

Closed stojkovicv closed 1 month ago

stojkovicv commented 1 month ago

Description

This PR adds the deployment automation script which is triggered on every code change in the development or master branch. It will automatically connect to the Linode instance over the SSH protocol, pull the latest code and reactivate the web servers. Linode instance hosts two separate folders, one for the master code and another for the development, just to keep things tidy. The Nginx proxy is configured to activate authentication for two locations:

  1. /webui -> deploying latest master code
  2. /webui-staging -> deploying latest development code

In order for this pipeline to work, 3 secret values has to be configured in the settings of this repository: ssh key, linode user and the machine's IP address.

Related Issue: #54

dsilhavy commented 1 month ago

Thanks @stojkovicv I suggest to split this up into two jobs. It looks like a change to the master branch will also redeploy the development branch and vice versa. What we can do is define a common job that takes some configuration variables like the port and the target folder. Then we use this common job in two separate jobs triggered for the development branch and the master branch. A similar example can be found here: https://github.com/Dash-Industry-Forum/dash.js/tree/development/.github/workflows

stojkovicv commented 1 month ago

I changed pipeline's structure to conduct one main workflow for two different scenarios. I also tested it on my fork repository for both deployment types.

dsilhavy commented 1 month ago

@stojkovicv Please add the required secrets to the project. Let me know if you are running into issues