Our aim is to demonstrate that you know the concepts of a CI/CD pipeline and common architecture, as well as building practical experience with the required tools and services.
There's more than one way to create one, that's why it's important to understand the concepts, so that you can apply them using whatever tools you (or your employer) prefer.
In our case I've chosen some tools that are:
So let's break down the plan a bit further. If you follow a full development lifecycle you would do some planning, including planning your architecture. A modern approach is to design your app's using a multi-tier architecture, with each app component residing in it's own subnet, with firewall rules managing ingress and egress traffic - this isn't a new concept to you, it's just the next step in a micro-service architecture. Typically you might have:
We're going to focus upon 2x tiers, Presentation and Application. If you're feeling ambitious, feel free to plan for a Data tier too, in fact I'd encourage it. But you'll find it difficult, and you'll gain a renewed appreciation for why Solution Architects, Software Developers, and Database Adminstrators are separate job roles!!!
We've started our Presentation tiers with your websites, and the most relevant options for hosting them are of course Amazon S3 or GCP Cloud Storage.
Our application tiers can start with simple 'hello-world' functions, again using the platform specific options, Lambda or Cloud Functions.
Once these are in place we need to connect them, in GCP you'll receive a URL to call your function, which can be embedded into your HTML. In AWS you'll need to deploy an API using API Gateway.
A website and a function don't make a pipeline, so we need to automate the process of deploying updates. As we mentioned on the slides, we're going to use a GitHub repository for our code, and to track changes. Then we'll use GitHub Actions to automate our 'update website' workflow. GitHub Actions provides 2000 free minutes per month, which is plenty.
Next steps:
This is what your architecture will look like [IMG]
You might have spotted a problem with the CSS rules. What if we wanted to apply rules to individual elements, rather than all h1 elements, or all divs. To do this we assign a CSS class to our html tags, and then refer to those tags in our CSS rules declared in the head block. These images below show the div tags with classes, the CSS rules with class selectors, and the different output in the browser: