teleren/devto huggingface dataset:
Microservices CI/CD With Terraform, AWS ECS & AWS CI/CD Tools
Tags: terraform, devops, aws, cicd
Published: 2021-08-15 11:45:58

---
title: Microservices CI/CD With Terraform, AWS ECS & AWS CI/CD Tools
published: true
description: Microservices CI/CD Using Terraform, AWS CI/CD Tools & Amazon ECS | AWS ECS Microservices CI/CD using AWS CI/CD Tools /Service i.e. AWS CodePipeline (Workflow) + AWS CodeCommit (Source) + AWS CodeBuild (Build) + AWS ECS (Deployment)
tags: terraform,devops,aws,cicd
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4hkkv85sighkl9d3xdl.png
---
Learn how to configure AWS CodeBuild & CodePipeline for any applications using Terraform

{% youtube CjjSBWMwOzA %}

## By the end of tutorial you will learn:
- What exactly are Microservices? 
- What is Continuous Integration?
- What is Continuous Delivery & Deployment?
- What is Infrastructure as Code & Terraform? 
- AWS Tools for CICD & Microservices
- Microservices CI/CD Demo with AWS + Terraform

What is Microservices?
--------------------------------------
Microservices are an architectural and organizational approach to software development where software is composed of small independent services that communicate over well-defined APIs. These services are owned by small, self-contained teams.

Microservices architectures make applications easier to scale and faster to develop, enabling innovation and accelerating time-to-market for new features.

What is Terraform?
-------------------------------
Terraform is an infrastructure as code (IaC) tool that allows you to build, change, and version infrastructure safely and efficiently. This includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc. Terraform can manage both existing service providers and custom in-house solutions.

What are the AWS CI/CD Tools?
---------------------------------------------------
AWS CodeCommit: Managed Git Repository Services (Source)

AWS CodeBuild: Container-based  Serverless Build tool/Service (Build)

AWS CodeDeploy: Deployment service

AWS CodePipeline: Workflow management e.g. Source ➡️  Build ➡️  Deploy 

▬▬▬▬▬▬ Useful Links 🔗 ▬▬▬▬▬▬ 
Terraform Course For Beginners:                             ►https://bit.ly/379r5dg
Demo Project GitHub Repo:                                      ►https://bit.ly/3scmsZs
Terraform AWS CodeBuild Documentation:           ►https://bit.ly/3jLyDss
Terraform AWS CodePipeline Documentation:      ►https://bit.ly/3m1ZweC
Terraform CodePipeline Providers Reference:       ►https://amzn.to/3yLrAq0

▬▬▬▬▬▬ Session Ebook 🚀      ▬▬▬▬▬▬ 
Microservices CI/CD With Terraform Ebook: ► https://bit.ly/3xJd2WB

▬▬▬▬▬▬ Connect with me 👋   ▬▬▬▬▬▬ 
My Site                                            ►  https://bit.ly/3rz82SQ
INSTAGRAM                                  ►  https://bit.ly/3iFWfy8
TWITTER                                        ►  https://bit.ly/3i6lkDs
LINKEDIN                                       ►  https://bit.ly/3rAeCsm
Dev log for Wonder Wanderer 2: Final Days #LOWREZJAM 😁
Tags: javascript, gamedev, devjournal, challenge
Published: 2021-08-15 11:44:54

So, I finished the game.
I managed to do all the levels, small animation and all.
Unfortunately I removed parts of the game I wanted to add (like more levels) and I didn't manage to create any SFX or music.
I'll make a more detailed version on the next day along with Wonder Wanderer 1.
Thank you for everything!
https://itch.io/jam/lowrezjam-2021/rate/1159390
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2kjo1q5or23vk9uyr2g.gif)
<figcaption> When you go darker, the game will be more harder...</figcaption>
How to deploy a Node, Postgres app to Heroku.
Tags: node, postgres, heroku
Published: 2021-08-15 11:15:45


Link to configure Node and Postgres [Link](https://blog.logrocket.com/nodejs-expressjs-postgresql-crud-rest-api-example/)

I assume you are developing a Node, Postgres app and maybe facing challenging on how to deploy your app to Heroku.

**1.** If you are using the configurations in your local environment using **.env** you need to add them in your Heroku app settings.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pknkhbx1dyxof4v4sduc.png)

**2.** Install Postgres in Heroku

* Click on your app
* Click on **Configure Add-ons**
* Search Postgres and Install it
* Click on **Heroku-Postgres Add-on**
* Select **Settings**
* Click on **View Credentials**

**3.** Let’s Connect to online Postgres Database via CLI

```
psql -h hostname -d databasename -U username
```
Check your DataBase informations by clicking

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8rekyt1i1baxgakjn676.png)

And go in the settings tab and replace them respectively using the command below

```
psql -h xxx-xx-xxx-xxx-xxx.compute-1.amazonaws.com -d xx9n7dxxhxx -U yhxxzyxxxezhxx
```
**3** After connecting to Heroku via CLI, You can now create tables
* An example of how to create a table using the CLI

```
CREATE TABLE users(id serial PRIMARY KEY, "firstName" VARCHAR (255) NOT NULL, "lastName" VARCHAR (255) NOT NULL, username VARCHAR (255) UNIQUE NOT NULL, email VARCHAR (255) UNIQUE NOT NULL, phone VARCHAR (255) UNIQUE NOT NULL, password VARCHAR (255), role VARCHAR (255) NOT NULL, "isActive" VARCHAR (255), "createdAt" TIMESTAMP, "updatedAt" TIMESTAMP );
```

* You may encounter *SSL* issues after creating your tables, in your production setup object in config file add

```
 dialectOptions: {
            ssl: {
                require: true,
                rejectUnauthorized: false,
            },
        },
```
Can you Learn Numpy in 5 Minutes?
Tags: programming, python, codenewbie, 100daysofcode
Published: 2021-08-15 11:43:18

Numpy provides some important functionalities for scientific calculations which include shape manipulation, sorting, basic linear algebra, and a lot more which help scientists and data programmers in their projects. 

Learn more about Numpy Python in this original Article.
[Learn NumPy in Just 5 Minutes](https://www.alixaprodev.com/2021/08/learn-numpy-in-5-minute.html) .
2021 CS50x - WEEK 9 UPDATE
Tags: webdev, html, css, flask
Published: 2021-08-15 11:37:40

I just finished CS50X - Week 9 which is on Flask MicroFramework and I'm impressed with myself for reaching this far in the course, and hopefully I reach the end.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uouo80xs00raod6r1zs9.png)
 
CS50X - WEEK 9 teaches about Web Application using Flask, it teaches how data is passed and manipulated between client and server side in webpages. The lecture was very intuitive on the topic as usual.
In the weeks' [problem set](https://cs50.harvard.edu/x/2021/psets/9/finance/), you were tasked with basically coding the backend and frontend of a website which allows users to trade stocks, the technologies used are SQL for storing user information, Python(Flask) for the backend, HTML|CSS for the webpages along with the use of Jinja Templating and also the [iexcloud.io](https://iexcloud.io) API for getting information on stocks. You're provided with boilerplate code for just basic things and some helper functions to give you a foundation to build on with the end product looking similar to CS50x Staffs' [Solution](finance.cs50.net)

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcw75sbcdzogna7ccjyn.png)

I recommend beginners like myself to take this course because it teaches a lot on different coding paths and its also free. You can register [here](https://learning.edx.org/course/course-v1:HarvardX+CS50+X/home)

I'm moving to week 10 now which is on Coding Ethics, I'm basically at the climax of the course and will start considering what I want to do for the Final Project.

``Harvard's CS50X(Intro to Computer Science) is a free course that teaches the art of programming``
HNG Internship 8.0
Published: 2021-08-15 11:25:47

Its another time of the year again, yes! that time of the year where brilliant minds from across the world come together to connect, learn, share ideas and create a lasting value that will impact the world at large. HNG internship adds great value to individuals through rigorous, intensive and yet fun training that lasts for a period of 8 weeks.

I joined HNG internship to learn, connect and above all to give myself a challenge. Seeing a lot of techies in the same space, I have never felt more energized since I started my dev career. The end goal for this internship is to get the HNG shirt, meaning I would go through and survive 10 stages. That aside my goal is to learn with others, connect with great minds, improve my coding skills greatly and use the skills I have acquired thus far to create value. I hope to achieve these by the end of the training.

I will be training under the frontend stack. Checkout these links below:
1.Learn git: https://www.youtube.com/watch?v=SWYqp7iY_Tc
2.Learn figma: https://www.youtube.com/watch?v=4W4LvJnNegA
3.Learn javascript: https://youtu.be/PkZNo7MFNFg.

Learn more about the Zuri team @https://zuri.team/
My Goals For HNG Internship
Tags: javascript, react
Published: 2021-08-15 11:22:25

HNG internship started on Thursday 😊 and the first task that would qualify us to next stage has commenced.
    I join the **Front-end track** of the HNG 8th internship with an uplifted spirit and a strong determination to get to the final stage because I didn't get to the final stage at the last internship HNGi7. 
    I was evicted at stage 3 last because I couldn't complete the task for the next stage 😥, I was a beginner then, just started learning the basics of website development. Even though it was a bit tough then, I enjoyed every bit of it and I gained a so much that I was patiently anticipating the next season of the HNG internship. 😊
   Finally, my dream come true as the HNG season 8 has commenced and I'm happy that I've acquired enough skills to be able to push through to the final stage of this internship and here are my goals;
1. To get to the final stage of the HNG8 internship and become an alumni. Well T-shits will be given to those that get to the final stage 😅 but for me, it's beyond the T-shirt.
2. To connect with other developers and network.
3. To improve my skills and learn new skills. 

  My goal is to also gain these soft skill by the end of the internship;
Communication.
Team work,
Collaboration.
Time Management.
Critical Thinking and 
Research and Analysis

Let's get started as the motivation is to never give up. You can also join the internship here 👇 and I promise you it's going to worth your time.
[Join the HNG8 internship](https://internship.zuri.team)
Wish me luck and see you there... 

Here's is a resource on designing with figma
[Figma tutorial](https://www.figma.com/resources/learn-design/
)
Here's is a resource on using GIT
[GIT tutorial](https://www.atlassian.com/git)
Here's is a beginner tutorial for HTML
[Learn HTML](https://www.w3schools.com/html/)
Start/stop Upgrade/downgrade EC2 instances with lambda functions
Tags: aws, lambdafunctions, ec2, instances
Published: 2021-08-15 11:09:07

Lambda functions are one of the most common services by AWS that comes really in handy. One of the very useful applications is the automation of starting/stopping and upgrading these instances.

###Example.

You want to start instances for a failover you can use the start and stop instances using lambda function by triggering the function use cloud watch alarm.

You want to scale up (vertically) an instance when it has a CPU utilization of more than some amount or has more traffic.
If you want to start and stop a dev instance in the night and you want to automate this process you can use a cloud watch event with a corn job to this.

It has more and endless application


Enough of all talk let’s get into it.
1. Create an IAM role with a policy that has full access for lambda. (IMPORTANT)
2. After Role is created create a lambda function with python 3.8 and use the role that you created above.
3. Use this code for the lambda function:


###Start Instances:
`import boto3
region = 'us-west-1'
instances = ['i-12345cb6de4f78g9h', 'i-08ce9b2d7eccf6d26']
ec2 = boto3.client('ec2', region_name=region)
def lambda_handler(event, context):
    ec2.stop_instances(InstanceIds=instances)
    print('stopped your instances: ' + str(instances))`


###Stop Instances:
`import boto3
region = 'us-west-1'
instances = ['i-12345cb6de4f78g9h', 'i-08ce9b2d7eccf6d26']
ec2 = boto3.client('ec2', region_name=region)
def lambda_handler(event, context):
    ec2.start_instances(InstanceIds=instances)
    print('started your instances: ' + str(instances))`

###Upgrade/downgrade(modify)
`import boto3
ec2 = boto3.client('ec2')
instance_id = 'i-05ca5f05f965b3a4b'
ec2.stop_instances(InstanceIds=[instance_id])
waiter=ec2.get_waiter('instance_stopped')
waiter.wait(InstanceIds=[instance_id])
ec2.modify_instance_attribute(InstanceId=instance_id, Attribute='instanceType', Value='t2.small')
ec2.start_instances(InstanceIds=[instance_id])
print("instances modified and started")`



## Reference

Official AWS documentation:
https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
Video explanation:
https://www.youtube.com/watch?v=oISuE16pGFQ
Achievement After 8 Weeks Of Internship At Zuri Internship
Tags: html, css, javascript, react
Published: 2021-08-15 10:57:23

My expectations involve being able to learn how to identify problems, how to choose strategies to address these issues, and how to plan and execute the tactics needed to achieve these goals. By learning this, I can gain real-world experience of what it takes to drive programming operations forward as a Front-end developer.
Some of the soft skill I will also want to gain are
Communication.
Interpersonal.
Collaboration.
Time Management.
Adaptability.
Critical Thinking.
Research and Analysis.

.A beginner tutorial for HTML
https://www.youtube.com/watch?v=pQN-pnXPaVg

.A beginner tutorial for Figma
https://www.youtube.com/watch?v=Gu1so3pz4bA

.A beginner tutorial for GIT
https://www.youtube.com/watch?v=RGOj5yH7evk

.A beginner tutorial for Javascript
https://www.youtube.com/watch?v=PkZNo7MFNFg


You can also join via
https://internship.zuri.team
Future job opportunities
Tags: jobs, apps, development, opportunities
Published: 2021-08-15 10:56:34

Tortor id molestie conubia nulla mauris aptent enim, dapibus varius etiam aliquam suspendisse fusce mus, hac porta est montes tellus diam. Nec purus integer quisque class porta non, nunc facilisis faucibus mus dictum, iaculis neque et cras hendrerit. Nunc lacus at tortor platea vitae potenti neque malesuada eros lacinia, curae velit est eleifend ante duis aptent pharetra litora inceptos, quis placerat ad bibendum aenean proin id condimentum fermentum. Feugiat integer diam tempor turpis fames leo fermentum nunc gravida, semper scelerisque libero ridiculus pretium quam dignissim sociosqu, vulputate magnis lacus class venenatis conubia varius bibendum.

Conubia potenti ultrices auctor sagittis dictumst duis vestibulum semper sapien, montes eu eget nam maecenas felis magnis mattis, accumsan pharetra volutpat cursus lacus sollicitudin hac ultricies. A vehicula posuere elementum etiam blandit nisl nam curabitur nulla, faucibus imperdiet accumsan diam sed lectus habitasse quisque, interdum vestibulum porta habitant torquent arcu sem facilisi. Venenatis porta netus tempor aliquam dis nisi mi ornare ridiculus bibendum, litora lobortis diam torquent pulvinar fames congue elementum at, egestas semper sagittis dui ultricies suspendisse justo posuere per.
Develoving at home: bad or good idea?
Tags: development, remotework, jobs, procastination
Published: 2021-08-15 10:53:37

*Lorem ipsum dolor* sit amet consectetur adipiscing, elit erat lectus ad laoreet eu, rutrum ac massa conubia ultrices. Ad ridiculus natoque rhoncus curae euismod vitae phasellus cubilia, vulputate hac commodo sociis posuere scelerisque quis ornare sed, erat vel inceptos convallis lobortis donec ligula. Odio potenti consequat pretium nunc hendrerit suscipit non, sociis accumsan aliquam mus ultrices pulvinar ullamcorper rutrum, vulputate pellentesque habitasse dictumst at ornare.

Primis ad ac facilisis nisl integer massa nulla magna, molestie justo pretium taciti ultricies nullam duis, gravida sodales sociis ut purus sed mi. Magnis montes habitant enim tortor pretium suscipit ante erat, imperdiet parturient volutpat luctus eget praesent mattis malesuada, vehicula netus rhoncus turpis class cras suspendisse. Praesent a nisl diam lectus at suscipit cum malesuada sem felis, accumsan commodo netus nam faucibus natoque facilisi parturient ultrices gravida, morbi fermentum mi bibendum sollicitudin aliquet auctor himenaeos nibh.
Figma Introduction
Published: 2021-08-15 10:36:57

Figma is a web-based graphics with additional offline features editing and user interface design app. You can use it to do all kinds of graphic design work:
- designing mobile app interfaces
- wireframing websites
- prototyping designs
- crafting social media posts

###How to user figma 
All you need to start using the app is a desktop computer or a laptop with a good browser and an internet connection. Visit [Figma Website](https://www.figma.com/) to create an account then you can start working on your designs.
Figma has a very beginner-friendly editor where you can create designs from scratch or using pre-made templates
My goals for the Zuri Internship 
Published: 2021-08-15 10:23:07

As a beginner, looking to break into the word of tech and web development, learning everything learnable to gain my footings in this fast paced tech world is one of my long term goals. 

Joined the Zuri internship to get hands on practical learning while developing my skills. I’m interested in doing the full stack in the future, but I’m taking it one step at a time, so I’m starting with the Front end track. Learning and becoming grounded in Html, CSS and JavaScript is one of my goals in this internship. Getting through all the stages is another. 

By the end of the internship program, I want to have mastered the three core front end programming languages as well as the JS frameworks. 

This is the link https://internship.zuri.team/ to learn more about the internship program. 

For a beginner tutorial on learning with Figma, click the link https://youtu.be/WhlNnf1711M. 

To learn how to set up and use git as a beginner, click this link https://youtu.be/iv8rSLsi1xo. 

To learn html, follow this link https://youtu.be/88PXJAA6szs. 

Finally, to learn python language as a beginner, click here https://youtu.be/kqtD5dpn9C8.
How to use the vuejs component in an angular project
Tags: vue, angular, customelements, webcomponents
Published: 2021-08-15 09:55:45

Vue 3.2 introduces a new defineCustomElement method for easily creating native custom elements using Vue component APIs:
```
import { defineCustomElement } from 'vue'

const MyVueElement = defineCustomElement({
  // normal Vue component options here
})

// Register the custom element.
// After registration, all `<my-vue-element>` tags
// on the page will be upgraded.
customElements.define('my-vue-element', MyVueElement)
```
This API allows develpers to create Vue-powered UI component libraries that can be used with any framework, or no framework at all. We have also added a new section in our docs on consuming and creating Web Components in Vue.

![Angular (forked)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9atko2qw3thehxogly76.png)
Let's do it.
Here in the angular main html template, we add a vue custom component:
```
<script src="https://unpkg.com/vue@next"></script>
<!-- <script src="https://unpkg.com/vue-custom-element@3.0.0/dist/vue-custom-element.js"></script> -->
<script>
  const MyVueWebComp = Vue.defineCustomElement({
    props: ['msg'],
    template:`
    <div style="border: 3px dashed green; padding: 5px">
      I am my-vue-web-comp.<br>
      Value received via "msg" prop: {{ msg }}<br>
      <input v-model="text"><button @click="addText">Type something and click me</button>
      <div v-for="t in texts">
        Text: {{ t }}
      </div>
    </div>
    `,
    data() {
      return {
        text: '',
        texts: []
      };
    },
    methods: {
      addText() {
        this.texts.push(this.text);
        this.text = '';
      }
    }
  })
  customElements.define('my-vue-web-comp', MyVueWebComp);
</script>

<my-app>loading</my-app> // my-app is app.component
```

And add CUSTOM_ELEMENTS_SCHEMA on app.module.ts
```
// app.module.ts
  schemas: [
    CUSTOM_ELEMENTS_SCHEMA // Added for custom elements support
  ]
```

And that's it, we can use our vue component, inside the angular project
```
// app.component
<h3>Hello, {{ name }}</h3>

<p>In index.html, a Vue component is defined using Vue and is wrapped into a Web Component using vue-custom-element.<br>

Now, in Angular's template, use it as if it were a native HTML Element (or regular native Web Component).
</p>

<my-vue-web-comp [msg]="name"></my-vue-web-comp>
```
 
[View code on github](https://github.com/ippatev/vue-in-angular-with-custom-elements)
[Preview on StackBlitz](https://stackblitz.com/edit/angular-jtjgfa)
My HNG Journey 
Tags: hng, hnginternship, frontend
Published: 2021-08-15 09:50:39

Today is Sunday, 15th August 2021, 9:50am WAT.

Sitting here, fingers ready, cursor blinking and thinking, the season 8 of HNG internship just begun and i'm a part of it on the frontend track!.

If you're familiar with the tech ecosystem in Africa then you must have heard of the [HNG Internship](https://internship.zuri.team/) , popularly acclaimed for it's rigorous stages and massive impact of producing some of the best tech talents on the continent.

Today I begin this journey, my goal at the end of this internship is to become a world class software engineer. To learn, unlearn and relearn several programming concepts. To put my grit and perseverance to the test. To be the best of the best. so game on.

Our greatest advantage in this day and age is the internet and our ability to learn anything from it. 

Here are a couple of links to tutorials that I find very helpful.

To learn design, the Figma crash course from DesignCourse is awesome. you can find it [here](https://www.youtube.com/watch?v=Gu1so3pz4bA&ab_channel=DesignCourse).

To learn Git, the git crash course from FreeCodeCamp is it!. you can find it [here](https://www.youtube.com/watch?v=RGOj5yH7evk&ab_channel=freeCodeCamp.org).

To learn Javascript, this Javascript crash course from JavaScriptMastery will get you started on the right track. you can find it [here](https://www.youtube.com/watch?v=g7T23Xzys-A&ab_channel=JavaScriptMastery).

If you're on the slack workspace for the internship, you can find me with the display name **00mikhael**.

Let's go  🚀