Skip to content

ferdeleong/project-placeholder

 
 

Repository files navigation

Site Reliability Engineering - Portfolio Site

Captura de Pantalla 2023-05-09 a la(s) 2 05 15 p m

Learned about Linux through a Flask project on the VPS, bash automation scripting, Test-Driven Development, Docker containerization, CI/CD pipelines through Github Actions, troubleshooting and monitoring using Prometheus and Grafana. The goal of the internship was to gain a comprehensive understanding of system reliability, scalability, and performance.

Tasks Week 2

Deploy their Flask app on a remote instance (doesn’t stay hosted when they close their terminal)

  • Create Digital Ocean VPS CentOS Stream 8, Basic Regular Intel with SSD 1GB / 1 CPU / 25GB Disk
  • Authentication: SSH keys
  • Install git & python3 installed
  • Install python virtual environment
  • Run Flask Application
  • Get Your Free Subdomain with DuckDNS
  • Keep Flask App Running with Tmux

Tasks Week 3

Set up your VPS instances in the cloud and chain together a load of the steps using scripting. Used scripting to speed up workflows and automate parts of the process.

  • Automate Deployment with Bash Scripting

Tasks Week 4

Deployed the project as a service, meaning your website will continue to be hosted when disconnected from the VPS.

  • Creating Service
  • Install a MySQL Database Server
  • Create Save and Retrieval Endpoints
  • Create Timeline Post Page

Tasks Week 5

Testing the changes to prevent bugs making their way into production. These tests will be used in future weeks to combine it with CI/CD.

Database Testing

  • Flask Application Testing

Tasks Week 6

“Containerise” the project in its current state, and then isolating different components out. Write configuration files, such as Dockerfile and Docker Compose

  • Setting up Docker
  • Test Docker Installation
  • Container Orchestration
  • Set Up Nginx and HTTPS

Tasks Week 8

Build tests into continuous integration systems to check new changes automatically on GitHub, using GitHub Actions. Once tests are running automatically, deploy your containers automatically to the VPS. Wrote YAML and build GitHub Actions.

  • GitHub Actions - Tests
  • GitHub Actions Deploy to DigitalOcean

Tasks Week 9

Monitor linux processes and memory usage and add monitoring systems into your projects, such as Prometheus and Grafana.

  • I/O Monitoring and Disk Bottlenecks
  • Setup Grafana Dashboards

Installation

Make sure you have python3 and pip installed

Create and activate virtual environment using virtualenv

$ python -m venv python3-virtualenv
$ source python3-virtualenv/bin/activate

Use the package manager pip to install all dependencies!

pip install -r requirements.txt

Usage

Create a .env file using the example.env template (make a copy using the variables inside of the template)

Start flask development server

$ export FLASK_ENV=development
$ flask run

You should get a response like this in the terminal:

❯ flask run
 * Environment: development
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

You'll now be able to access the website at localhost:5000 or 127.0.0.1:5000 in the browser!

Note: The portfolio site will only work on your local machine while you have it running inside of your terminal. We'll go through how to host it in the cloud in the next few weeks!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

project-placeholder created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 47.8%
  • Python 23.4%
  • CSS 12.7%
  • Shell 8.2%
  • JavaScript 7.3%
  • Dockerfile 0.6%