============================================
============================================
git clone
npm i
- Title and Description on index.html.
- Project Name on Root level package.json
sudo apt update
sudo apt install nodejs
node -v
use node -v to verify install.
sudo apt update
sudo apt install nginx
sudo apt-get install ufw
sudo ufw allow 'Nginx HTTP'
systemctl status nginx
** UFW = Uncomplicated Firewall https://help.ubuntu.com/community/UFW
adduser username
Set Sudo Privilages
sudo usermod -aG sudo username
Switch to new User.
su username
Go to NGINX WWW folder.
cd /var/www/
Make new website folder.
sudo mkdir websitename
Change Directory to New Folder.
cd websitename
In Repo Settings/Actions/MakeNewRunner
Set Operating System to Linux Architectur X64.
Copy and Paste runner commands in the folder created in step 10. (You cannot do this step as a root user.)
Skip first command mkdir actions-runner && cd actions-runner
because we already created the website folder in step 10.
Download Runner Package and Extract.
Remove tar.gz file after extracted.
sudo rm -r filename
Run this command to allow user to "Create the Runner and start the configuration"
sudo chmod -R 777 /var/www/websitename
Paste and Run Configuration command
- Hit enter for default group runner name.
- Name Runner
- Press Enter to Skip Labels
- Press Enter to leave _work folder as default.
sudo ./svc.sh install
sudo ./svc.sh start
-
Navigate to sites-available folder.
cd /etc/nginx/sites-available/
-
Edit Default File in Sites-Available folder.
sudo nano default
-
Comment out.
listen 80 default_server; listen [::]:80 default_server;
-
Change link to website
root /var/www/websitename/_work/repo_name/repo_name/;
-
Add domain and ip address to server_name.
server_name domainname.com ipaddress;
-
Update Location. Comment out # try_files $uri $uri/ =404. Paste code snippet in location.
proxy_pass http://localhost:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade;
-
Exit and Save.
sudo service nginx restart
Run Command
sudo visudo -f /etc/sudoers.d/username
Paste into nano editor.
username ALL=(ALL) NOPASSWD: /usr/sbin/service nginx start./usr/sbin/service nginx stop./usr/sbin/service nginx restart
Save and Exit nano editor.
Reboot Server
sudo reboot
name: Test Linode CLI
on: push
jobs:
job-name:
steps:
- uses: actions/checkout@master
- name: Setup Linode cli
uses: brendon1555/setup-linode-cli@master
with:
LINODE_CLI_TOKEN: ${{ secrets.LINODE_CLI_TOKEN }}
- run: linode-cli --help
- test.text hello world - create action to copy to linode.
- setup commands to build file.
- Setup NGINX
- Source
- Require Reviewers before pushing to deployment
- Build
- Compile Sources and Dependencies
- Run Unit Tests
- Check and Enforce Code Coverage. 90%
- Test Enviroment
- Run Integration Tests
- Production Environment - 1 box = 10% of traffic.
- Alarms On Errors, Latency, Key Business Metrics
- Bake Period - 24 hours
- Anomaly Detection or Error Counts + Latency Breaches
- Canary... (Coal Mine. Looks for problems)
- cron job triggers ever few minutes.
- Prod Environment
- Alarms On Errors, Latency, Key Business Metrics
- Bake Period - 24 hours
- Anomaly Detection or Error Counts + Latency Breaches c. Canary... (Coal Mine, Looks for problems) cron job triggers ever few minutes.