loading...

25 days into the #100daysofcode challenge

remster85 profile image Remi Desreumaux ・2 min read

Hello there, being in the middle of the Covid-19 quarantine in NYC, I decided to resume the challenge I started last summer: Remstrava.
The last few days were focused on Continuous Delivery and SSL/TLS.

The goal is simple: being able to deploy any change without any sort of overhead and have the data refreshed in a near-instantaneous fashion.

The application is made of:

  • an angular front-end
  • a back-end that returns activities
  • a logic app that integrates data from strava to Azure Data Storage
  • a standalone github repository

Github repo split πŸ“„

Docker 🐳

I dockerized my front-end using https://docs.docker.com/toolbox since I am running on Windows 10 from an Asus zenbook. One tricky part was to view my front-end running from my local docker image using 192.168.99.100 and not localhost.

### STAGE 1: Build ####
FROM node:12.7-alpine AS build
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build

### STAGE 2: Run ###
FROM nginx:1.17.1-alpine
COPY --from=build /usr/src/app/dist/remistrava /usr/share/nginx/html

CD Pipelines πŸ”§

Then I deployed my image to Azure container registry and created an AKS cluster to deploy my image. Creating the Azure pipeline was very smooth using the available templates on Azure Devops.

Events πŸ“¬

I created a webhook on strava using Azure function and then configured the Azure pipelines for my webhook strava api.

I also created an Azure Event Hub to be notified from new activities and decouple my webhook from the Logic App instance (at the time of writing).

SSL/TLS πŸ”’

It was tedious to configure SSL/TLS all the way as the certificate request was pending or some other issue happened using LetsEncrypt. It turned out that I had to clean all my resources in order to have something consistent.
The following workshop was pretty useful https://docs.microsoft.com/en-us/learn/modules/aks-workshop and replaying step by step for my own application was successful.

πŸ‘οΈβ€πŸ—¨οΈ https://remstrava.westus.cloudapp.azure.com

Next, I would like to:

  • Explore database options / Improve data retrieving performances
  • Offer anyone the option to load its own data using OAuth2
  • Enhance Security

Discussion

pic
Editor guide
Collapse
adgower profile image
Alex Gower

Sweet what is the app?

Collapse
remster85 profile image
Remi Desreumaux Author

Hi Alex, it's a simple app that leverages on strava.com, the social running platform.
-> github.com/remster85/strava-100days
-> remstrava.westus.cloudapp.azure.com