Skip to content
Permalink
Browse files
added links to CI CD resources
  • Loading branch information
aa7401 committed Nov 25, 2018
1 parent d4769b2 commit 4d0c220e25b23878805d97f0dab97096bc857e98
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
@@ -3,18 +3,22 @@

Resources:

1. [Lecture slides](https://docs.google.com/presentation/d/1takMoPNZTk4IyfqrEssDm9yFfkQQxuA16ZBoohUso80/edit?usp=sharing)
1. [Lecture slides](https://drive.google.com/open?id=1takMoPNZTk4IyfqrEssDm9yFfkQQxuA16ZBoohUso80)

## 1 Profiling

NodeJS includes the **Tick Profiler**, a native tool, which allows you to profile your NodeJS code. It is activated using the `--prof` flag, eg:

```shell
$ node --prof index.js
```

This will capture data on the performance but, in a development environment this will need to be simulated using the [Apache Bench](https://httpd.apache.org/docs/2.4/programs/ab.html) tool, eg:

```shell
$ ab -k -c 20 -n 250 "http://localhost:8080"
```

You will note that there are three flags used:

1. `-k` - **KeepAlive** - perform multiple requests using the same session.
@@ -25,7 +29,8 @@ Apache Bench generates a range of useful data however we need more information t

## The Tick File

by using the `--prof` flag, NodeJS generates a _tick file_ in the current directory with the name ` isolate-0xnnnnnnnnnnnn-v8.log`, where nnn... is a number. This file needs to be interpreted using a _tick interpreter_ and the analysis piped to a text file which can then be opened and read.
by using the `--prof` flag, NodeJS generates a _tick file_ in the current directory with the name `isolate-0xnnnnnnnnnnnn-v8.log`, where nnn... is a number. This file needs to be interpreted using a _tick interpreter_ and the analysis piped to a text file which can then be opened and read.

```shell
$ node -prof-process isolate-0xnnnnnnnnnnnn-v8.log > processes.txt
```
@@ -157,4 +157,16 @@ $ heroku run bash

### 6.1 Deploying Directly From GitHub

https://medium.freecodecamp.org/how-to-deploy-a-nodejs-app-to-heroku-from-github-without-installing-heroku-on-your-machine-433bec770efe
There is an alternative approach which is to deploy directly from GitHub. This process can be triggered by pushing commits to your repository. There is a very easy to follow [tutorial](https://medium.freecodecamp.org/how-to-deploy-a-nodejs-app-to-heroku-from-github-without-installing-heroku-on-your-machine-433bec770efe) that covers this step by step.

## 7 Deploying Using the DPL Tool

The [DPL tool](https://github.com/travis-ci/dpl) was originally developed for use in the [Travis](https://travis-ci.org) CI tool but can be employed as a general purpose deployment tool and works well with Heroku.

The DPL tool is written in the [Ruby](https://www.ruby-lang.org/en/) programming language so you need to install a couple of ruby tools first and use these to install the `dpl` tool.

```shell
apt-get install -y ruby ruby-dev rubygems-integration
gem install dpl
dpl --provider=heroku --app=johndoe-dpl --api-key=95023c27-5a9d-4250-a3fd-d2e19e0dac02
```
@@ -2,7 +2,18 @@

# Continuous Delivery

In this lab you will learn how to implement Continuous Delivery of your application using the CodeShip cloud service.
In this lab you will learn how to implement Continuous Delivery of your application using two different services:

1. [GitLab](https://gitlab.com) provides an integrated CI/CD DevOps pipeline which makes use of Docker containers and is simple to configure.
2. [CodeShip](https://codeship.com) is example of Software as a Service (SaaS) and integrates with GitHub via an authentication token.

Resources:

1. [Lecture slides](https://drive.google.com/open?id=1b00JkdBlx05DjDrWKwZdJtzHbJR7Nstfw4_vUR9StBE)
2. [Starting and Scaling DevOps in the Enterprise (e-book)](https://page.gitlab.com/rs/194-VVC-221/images/Starting%20and%20Scaling%20DevOps%20in%20the%20Enterprise.pdf)
3. [Simple authentication API](https://gitlab.com/covcom/authentication)

Feel free to make use of the simple authentication API in your assignment, this will allow you to focus on building the core functionality. Be aware you will need to modify it to get it to integrate into the rest of your project.

## CodeShip CI

@@ -40,10 +51,7 @@ Paste in the GitHub url where requested and, on the next screen select **Basic p

On the **Configure your tests** screen choose **NodeJS** from the dropdown list and delete all the commands from the list except `npm install`.

Resources:

1. [Lecture slides](https://drive.google.com/open?id=1b00JkdBlx05DjDrWKwZdJtzHbJR7Nstfw4_vUR9StBE)
2. [Starting and Scaling DevOps in the Enterprise (e-book)](https://page.gitlab.com/rs/194-VVC-221/images/Starting%20and%20Scaling%20DevOps%20in%20the%20Enterprise.pdf)
--------

Each week you will be expected to complete a series of lab activities. You will be required to reflect on these in your assignment so make sure you keep records of what you have done. This lab will include your third sprint and will bring together many of the topics already covered.

0 comments on commit 4d0c220

Please sign in to comment.