Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blue green #12

Open
wants to merge 354 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
383ac9e
Merge pull request #6 from containers101/raziel
Superfresh Mar 14, 2017
cfbf69f
Update docker-compose.yml
Superfresh Mar 14, 2017
9d372a8
Update login.html
Superfresh Mar 14, 2017
8b797e5
Merge pull request #7 from containers101/raziel
Superfresh Mar 14, 2017
dd36f50
Update login.html
Superfresh Mar 14, 2017
b98fb66
Merge pull request #8 from containers101/chegg
Superfresh Mar 14, 2017
4456500
Update login.html
Superfresh Mar 15, 2017
c2cc9aa
Merge pull request #9 from containers101/razielbranch
Superfresh Mar 15, 2017
87f1dd4
redeploy to ecs
nIvanovp Mar 17, 2017
dee53eb
Update login.html
Superfresh Mar 30, 2017
462a837
Update codefresh.yml
Superfresh Mar 31, 2017
50035be
Update codefresh.yml
Superfresh Mar 31, 2017
feac878
add connection
verchol Apr 3, 2017
d3ae3c0
fix package json
verchol Apr 3, 2017
02b2142
Update docker-compose.yml
Superfresh Apr 3, 2017
4eb1cf7
Update docker-compose.yml
Razielt77 Apr 3, 2017
b5b3161
add retry mechaninsm
verchol Apr 4, 2017
bf49980
add retry mechaninsm
verchol Apr 4, 2017
1772f45
remove prestart
verchol Apr 4, 2017
413fc9d
Update README.md
Superfresh Apr 4, 2017
de81001
Merge pull request #10 from containers101/fix_mongo_connection
verchol Apr 4, 2017
c23f939
update to latest node
verchol Apr 4, 2017
a8447d5
Merge pull request #11 from containers101/update_docker
verchol Apr 4, 2017
dde43f0
Update docker-compose.yml
Superfresh Apr 4, 2017
b2d41d8
Update README.md
Superfresh Apr 4, 2017
e200847
Update docker-compose.yml
Razielt77 Apr 4, 2017
384ecb0
fix unit mongo test
verchol Apr 5, 2017
4523d3b
Merge pull request #12 from containers101/update_unit_tests
verchol Apr 5, 2017
70ae89b
skip tests
verchol Apr 5, 2017
15af369
Merge pull request #13 from containers101/update_unit_tests
verchol Apr 5, 2017
5bcd15e
added ecs deploy
kosta-codefresh Apr 15, 2017
ef69f04
added ecs deploy
kosta-codefresh Apr 15, 2017
d489be2
added ecs deploy
kosta-codefresh Apr 15, 2017
65cea13
added ecs deploy
kosta-codefresh Apr 15, 2017
9e4586f
Update codefresh.yaml
itai-codefresh Apr 18, 2017
e720b5a
Update codefresh.yml
itai-codefresh Apr 18, 2017
d0d763b
Update codefresh.yml
itai-codefresh Apr 18, 2017
48b6816
Update codefresh.yml
itai-codefresh Apr 18, 2017
c7e437f
Update codefresh.yml
itai-codefresh Apr 18, 2017
3274b3d
Update codefresh.yml
itai-codefresh Apr 18, 2017
66f2733
added kubernetes deploy
kosta-codefresh Apr 18, 2017
daab6aa
added kubernetes deploy
kosta-codefresh Apr 18, 2017
5ae1063
kube-deployment.yml
kosta-codefresh Apr 19, 2017
01c7e40
kube-deployment.yml
kosta-codefresh Apr 19, 2017
d265a89
test commit 1
kosta-codefresh Apr 19, 2017
ee34ad3
test commit 2
kosta-codefresh Apr 19, 2017
013a8ff
test commit 3
kosta-codefresh Apr 19, 2017
7d0e790
test commit 3
kosta-codefresh Apr 19, 2017
674be23
test commit 4
kosta-codefresh Apr 19, 2017
cf33155
test commit 5
kosta-codefresh Apr 19, 2017
4f13c1c
test commit 5
kosta-codefresh Apr 19, 2017
d37b5e4
merged with deploy-demo
kosta-codefresh Apr 19, 2017
9d397fb
Update login.html
itai-codefresh Apr 19, 2017
58923bd
update
itai-codefresh Apr 19, 2017
f8d59fd
deploy to k8
itai-codefresh Apr 19, 2017
59659b3
Update login.html
itai-codefresh Apr 19, 2017
ee271ed
test commit
itai-codefresh Apr 19, 2017
3efd93c
Update login.html
itai-codefresh Apr 19, 2017
0b9b856
Update login.html
itai-codefresh Apr 19, 2017
1af9eb5
Update login.html
itai-codefresh Apr 19, 2017
01c07af
Demo for Axway
verchol Apr 19, 2017
0a44772
Post DockerCon Cleanup
Superfresh Apr 21, 2017
25c11c2
Update codefresh.yml
Superfresh Apr 27, 2017
557ef57
Update mongo.unit.spec.js
Razielt77 Apr 27, 2017
ddd5014
Update Dockerfile
Superfresh Apr 27, 2017
d3f4274
deploy/kube-deployment.yml - moved to /deployment.yml
kosta-codefresh May 9, 2017
1d3b81e
Change codefresh yml to use composition test
roy-codefresh May 24, 2017
e3263ea
Update deployment.yml
verchol Jun 7, 2017
c22ebe0
Create deployment.yml
verchol Jun 8, 2017
4fc1890
Create deployment.yml
verchol Jun 8, 2017
54a7e60
origin/board-demo
verchol Jun 8, 2017
dad2c70
reduce replicas
verchol Jun 8, 2017
4a05aef
deployment
verchol Jun 8, 2017
bc624a4
fix
verchol Jun 8, 2017
2061597
fix
verchol Jun 8, 2017
729abfd
fix
verchol Jun 8, 2017
4d0ee06
fix
verchol Jun 8, 2017
1c935e5
fix image name
verchol Jun 9, 2017
210fb39
fix
verchol Jun 9, 2017
1c9b1d5
add mongo
verchol Jun 9, 2017
54f4198
fix
verchol Jun 13, 2017
ddc088d
Create login.html
Superfresh Jun 15, 2017
4aa09e8
add helm variable
Jun 19, 2017
d7455ee
Update login.html
Superfresh Jun 20, 2017
1df419c
Update Dockerfile
Superfresh Jun 21, 2017
9b19e5a
Merge branch 'master' of https://github.com/containers101/demochat in…
verchol Jun 22, 2017
26c2b74
mongo dockerfile
Jun 28, 2017
a48d599
Update Dockerfile
Superfresh Jun 29, 2017
0405503
Update login.html
Superfresh Jun 30, 2017
0bec296
add yaml
Jul 3, 2017
37b799d
add annotation
Jul 3, 2017
8abfad4
add annotation
Jul 3, 2017
63b04ad
add annotation
Jul 3, 2017
bb0f1ec
add annotation
Jul 3, 2017
b0e7332
add annotation
Jul 3, 2017
206289d
add annotation
Jul 3, 2017
6ec4b6b
updated the readme: codefresh registry
nIvanovp Jul 5, 2017
f06ab48
Update login.html
Superfresh Jul 6, 2017
ef9fb7a
Update login.html
Superfresh Jul 6, 2017
a43da88
Update README.md
Superfresh Jul 6, 2017
ea0d1a9
Update README.md
Superfresh Jul 6, 2017
870d197
fix
verchol Jul 17, 2017
5b2418f
demo-var
verchol Jul 17, 2017
3c12740
fix
verchol Jul 17, 2017
4e97391
fix
verchol Jul 17, 2017
51a0a75
add
verchol Jul 17, 2017
131d206
add
verchol Jul 17, 2017
9e113ac
add
verchol Jul 17, 2017
b1a1fe5
add env git
verchol Jul 17, 2017
327b6e3
add env git
verchol Jul 17, 2017
086505d
fix yaml
verchol Jul 17, 2017
86431b4
Update login.html
Superfresh Jul 20, 2017
5c7e3e5
Add node_modules and remove them from gitignore (#19)
itai-codefresh Aug 8, 2017
c060315
Merge branch 'master' of https://github.com/containers101/demochat in…
verchol Aug 14, 2017
f210721
handle node modules
verchol Aug 15, 2017
15bdcdd
handle modules
verchol Aug 15, 2017
130ad6a
fix
verchol Aug 15, 2017
87e4016
change yarn
verchol Aug 15, 2017
a3debb3
add prod flag
verchol Aug 15, 2017
41da41b
Demo with Nadine's name
Superfresh Aug 15, 2017
a1eddfd
Removing Nadine
Superfresh Aug 15, 2017
b290479
Adding Karl
Superfresh Aug 15, 2017
930216c
remove Karl
Superfresh Aug 15, 2017
9c52f4b
Reset to default
Superfresh Aug 15, 2017
fba9304
Merge branch 'master' of https://github.com/containers101/demochat
Superfresh Aug 15, 2017
cb361ff
add all
verchol Aug 23, 2017
26b8f2d
Merge branch 'master' of https://github.com/containers101/demochat
verchol Aug 23, 2017
9a68861
commit for demo
verchol Aug 23, 2017
e04626f
Update Dockerfile
verchol Aug 23, 2017
0f0ac58
fixed title
Superfresh Aug 25, 2017
0ea8681
Reove integration test
Superfresh Aug 28, 2017
9b5a583
Remove mongo tests
Superfresh Aug 28, 2017
a82fbe8
Readd Tests
Superfresh Aug 28, 2017
d1eda6e
Test new Dockerfile
Superfresh Aug 28, 2017
c6e3371
Remove mongo tests
Superfresh Aug 28, 2017
f64bc6e
return prod flag
verchol Aug 29, 2017
5c3f8d4
Remove prod from master
Superfresh Aug 29, 2017
a84aae5
Say hello to Google Cloud
Superfresh Aug 29, 2017
9148927
remove hello text
Superfresh Aug 30, 2017
82bbbca
Say hi to Gcloud
Superfresh Aug 30, 2017
148fac8
Update login.html
Superfresh Aug 30, 2017
5b33910
Update login.html
verchol Aug 31, 2017
c3201a8
Say hi to Oracle
Superfresh Sep 8, 2017
5b83270
Fix saying hi to Oracle
Superfresh Sep 8, 2017
20f7a9a
Update login.html
Superfresh Sep 8, 2017
7646dda
Get rid of Oracle
Superfresh Sep 11, 2017
3fed13c
Merge branch 'master' of https://github.com/containers100/demochat
Superfresh Sep 11, 2017
f56e690
Say hi to Mailchimp
Superfresh Sep 11, 2017
dda6d6a
no more mailchimp
Superfresh Sep 11, 2017
1e9d3e9
hi redhat
Superfresh Sep 11, 2017
aee7b7a
bye redhat
Superfresh Sep 11, 2017
c72e5c7
hello portworx
Superfresh Sep 11, 2017
3a95105
hello big demo
Superfresh Sep 11, 2017
4aa9829
Update login.html
Superfresh Sep 12, 2017
4d1854e
say hi to the crowd
Superfresh Sep 12, 2017
8eba318
no more OSSummit
Superfresh Sep 13, 2017
1ee7922
say hi to pluralsight
Superfresh Sep 13, 2017
10799cd
Update login.html
Superfresh Sep 14, 2017
b076741
Update login.html
Superfresh Sep 15, 2017
42fb121
Hello rackspace
Superfresh Sep 19, 2017
c8f9a20
Update login.html
Superfresh Sep 21, 2017
6cb88b9
helloLA
Superfresh Sep 22, 2017
33799fe
Hello Seattle
Superfresh Sep 22, 2017
f86cb29
Update codefresh.yml
Superfresh Sep 24, 2017
3e31ae1
Update annotation.yml
Superfresh Sep 24, 2017
b73de7f
Update annotation.yml
Superfresh Sep 25, 2017
9aeffec
Rename deployment.yml to k8deployment.yml
Superfresh Sep 25, 2017
eb00ece
Update login.html
Superfresh Sep 25, 2017
fe74123
Update login.html
Superfresh Sep 26, 2017
3aa011b
Merge pull request #21 from containers101/dockernycc
Superfresh Sep 26, 2017
076bbd0
Update login.html
Superfresh Sep 26, 2017
52e5991
Update login.html
Superfresh Sep 26, 2017
44382a9
Merge pull request #22 from containers101/dockernyc
Superfresh Sep 26, 2017
caec2ae
Go generic
Superfresh Sep 27, 2017
49b3f4e
Say hi to Diamanti
Superfresh Sep 29, 2017
e8dec1f
reset
Superfresh Oct 4, 2017
668d1f0
say hi to wipro
Superfresh Oct 4, 2017
6b215f1
go back to default
Superfresh Oct 10, 2017
dda886d
Midnight commit
Superfresh Oct 12, 2017
b2b4f97
Update login.html
Superfresh Oct 17, 2017
063d3cf
Say hi to Chicago
dangerfield01 Oct 17, 2017
8669279
Bye Chicago!
dangerfield01 Oct 20, 2017
6e80261
Update login.html
Superfresh Oct 23, 2017
b2d443a
Update login.html
Superfresh Oct 23, 2017
5100fab
Update login.html
Superfresh Oct 24, 2017
926df69
Update login.html
Superfresh Oct 25, 2017
868cfba
Update login.html
Superfresh Oct 25, 2017
4bbfc93
Update login.html
Superfresh Oct 25, 2017
2914e9f
Update login.html
Superfresh Oct 25, 2017
36041f9
Merge pull request #23 from containers101/siva
Superfresh Oct 25, 2017
da845b9
Create fullpipeline.yml
Razielt77 Oct 25, 2017
b43503e
Update login.html
Superfresh Oct 26, 2017
d94a519
Update login.html
Superfresh Oct 26, 2017
9f52e73
resolving CF-4508
Razielt77 Oct 27, 2017
6b6c5fd
mv
dangerfield01 Oct 27, 2017
0f4c9c6
fixing CF-4508
Oct 27, 2017
fb0fd6e
fixing CF-4508
Oct 27, 2017
97dc927
fixing CF-4508
Oct 27, 2017
941b36c
Update login.html
Superfresh Oct 29, 2017
7b77e1d
Update fullpipeline.yml
Razielt77 Oct 30, 2017
1bb51f6
fixing CF-4705
Razielt77 Oct 30, 2017
dc3eb6f
halloween
dangerfield01 Oct 30, 2017
adf6428
no halloween
dangerfield01 Oct 30, 2017
1e4364f
fixing CF-1123
Superfresh Oct 30, 2017
fdf5df8
reset to normal
dangerfield01 Oct 30, 2017
09674a3
Update login.html
Superfresh Oct 31, 2017
080cb19
Happy halloween in demo
todaywasawesome Oct 31, 2017
6c0fb56
Merge pull request #24 from todaywasawesome/patch-1
Superfresh Oct 31, 2017
5e7fdf3
fixing CF-4705
Razielt77 Oct 31, 2017
f8a5a75
Update fullpipeline.yml
Razielt77 Oct 31, 2017
8164f67
fixing CF-4705
Razielt77 Oct 31, 2017
c2a0055
CF-1405
Razielt77 Nov 1, 2017
a79723c
adding helm chart CF-4508
Nov 2, 2017
d53dda2
CF-4508
Razielt77 Nov 2, 2017
80de7df
CF-4508
Superfresh Nov 2, 2017
c64791d
hi friends
dangerfield01 Nov 7, 2017
47c066e
CF-4508 remove hello
dangerfield01 Nov 9, 2017
2472e79
Thursday CF-4489
dangerfield01 Nov 9, 2017
9828baf
CF-4508
Razielt77 Nov 14, 2017
b39e253
Hi Bay Area CF-4489
dangerfield01 Nov 17, 2017
d712316
Hi bay area, CF-4889
dangerfield01 Nov 17, 2017
8676aa9
Test change CF-4489
dangerfield01 Dec 6, 2017
8c91538
Say hi kubecon
dangerfield01 Dec 6, 2017
90f4447
fixing CF-4939
Razielt77 Dec 20, 2017
fe7ec6a
Add imagePullSecrets to deployment template
Dec 22, 2017
ff28590
fix CF-5064
Razielt77 Jan 5, 2018
fbab4c3
say demo
dangerfield01 Jan 16, 2018
bde5a4f
Fixing CF-5086
Jan 17, 2018
d4ecf56
Bonjour mec
dangerfield01 Jan 18, 2018
ff89f33
reset to normal
dangerfield01 Jan 23, 2018
d137f15
Update README.md
kosta709 Mar 29, 2018
8b935e5
update CF-5100
Razielt77 Apr 2, 2018
8b470c9
Update README.md
kosta709 Apr 3, 2018
55cb26a
add bluegreen text
dangerfield01 Apr 6, 2018
f30f9c7
deploy green version
dangerfield01 Apr 6, 2018
7fd3c42
deploy blue version
dangerfield01 Apr 6, 2018
acc5a61
Blue
dangerfield01 Apr 7, 2018
15ef745
hwatever
dangerfield01 Apr 17, 2018
425a138
reset
dangerfield01 Apr 17, 2018
8202c6b
break images for demo at PubSub
dangerfield01 Apr 18, 2018
be0b0d6
Add bluegreen yamls in deployment
dangerfield01 Apr 18, 2018
581caba
fix images
dangerfield01 Apr 18, 2018
ee049de
Go blue
dangerfield01 Jul 19, 2018
ff3d282
Change title to blue
dangerfield01 Jul 19, 2018
81ec620
bump version
dangerfield01 Jul 19, 2018
40b64ab
bump version
dangerfield01 Jul 19, 2018
c58692b
bump version
dangerfield01 Jul 19, 2018
758884a
test trigger
dangerfield01 Jul 19, 2018
7c71206
reset webhook
dangerfield01 Jul 19, 2018
295944d
bump webhook
dangerfield01 Jul 19, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
settings.yml
settings.js

node_modules
bower_components
npm-debug.log
.DS_Store
.idea
Expand Down
21 changes: 8 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM node:0.10-slim
# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/)
FROM kkarczmarczyk/node-yarn:8.0

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY ./package.json /src/package.json
RUN cd /src && npm install
COPY ./ /src
RUN npm install -g mocha
RUN npm install -g istanbul
RUN npm install -g gulp
COPY package.json /usr/src/app/
RUN yarn install
COPY . /usr/src/app

WORKDIR /src
#ENV DEBUG=*

EXPOSE 8080 5222

CMD ["npm", "start"]
CMD [ "npm", "start" ]
11 changes: 11 additions & 0 deletions Dockerfile.latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/)
FROM node:latest

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app/
RUN npm install --silent
COPY . /usr/src/app

CMD [ "npm", "start" ]
12 changes: 12 additions & 0 deletions Dockerfile_prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:0.10-slim

COPY ./package.json /src/package.json
RUN cd /src && npm install
COPY ./ /src

WORKDIR /src
#ENV DEBUG=*


CMD ["npm", "start"]

165 changes: 159 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
Build status: [![Codefresh build status]( https://g.codefresh.io/api/badges/build?repoOwner=containers101&repoName=demochat&branch=master&pipelineName=demochatdfdf&accountName=Razielt77_github&type=cf-1)]( https://g.codefresh.io/repositories/containers101/demochat/builds?filter=trigger:build;branch:master;service:58543cb490a3f40100db408f~demochatdfdf)
Demo for Axway
![Let's Chat Greylock](http://i.imgur.com/0a3l5VF.png)
#test1
#test2
![Screenshot](http://i.imgur.com/C4uMD67.png)
Test Test
A self-hosted chat app for small teams or big Gal by [Security Compass][seccom].

[![Build Status](https://travis-ci.org/sdelements/lets-chat.svg?branch=master)](https://travis-ci.org/sdelements/lets-chat)
[![Dependency Status](https://david-dm.org/sdelements/lets-chat.svg)](https://david-dm.org/sdelements/lets-chat)
[![devDependency Status](https://david-dm.org/sdelements/lets-chat/dev-status.svg)](https://david-dm.org/sdelements/lets-chat#info=devDependencies)


## Features and Stuff

Expand Down Expand Up @@ -91,3 +88,159 @@ Released under [the MIT license][license].
[install-docker]: https://registry.hub.docker.com/u/sdelements/lets-chat/
[install-heroku]: https://github.com/sdelements/lets-chat/wiki/Heroku
[install-vagrant]: https://github.com/sdelements/lets-chat/wiki/Vagrant





![Let's Chat Greylock](https://codefresh.io/wp-content/uploads/2017/03/lets-chat.png)


Use this tutorial to familiarize yourself with codefresh.yml file and Codefresh functionality.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/11.png)


This tutorial is based on Let’s Chat [app].

https://github.com/containers101/demochat

### Let’s Chat is self-hosted chat app for small teams or big

This tutorial will walk you through the process of adding the following :


* Build step - that will build Docker image for your Let’s Chat app

* Push to registry step - that will push your image to Docker Hub

* Unit Test step - A freestyle step that runs the unit test of the demo chat after the build

* Composition step - This step will create and launch a composition.

So, the first thing you need to do is :

## Fork our repo

Enter the following link and fork Let’s Chat app!: ```https://github.com/containers101/demochat```


## Add a service
Now enter Codefresh and add your Let’s Chat app as a Codefresh service.

Click on ___Add Repository___

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/add-repo.png)


Now add your forked demochat repo. You can search for it by typing "demochat" to search. You can also Add by URL here.

Also, choose the branch for your first build (in this case ```master```)

When you finish press ___Next___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/select-repo2.png)


Select how you would like to setup your repository. In this case, our repo has a ___Dockerfile___, so we'll select the middle option.


![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/15.png)

By default, Codefresh searches for your Dockerfile at the root level of your repository, by the name "Dockerfile". The demo-chat example includes a Dockerfile in the root level.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/16.png)


Review your Dockerfile, and click ___Create___ to add your repository.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/17.png)

Clicking on ___Build___ button will trigger a regular build.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/18.png)

Great, you are running your build for the first time!

## Push your image to Docker registry
In Codefresh the build images will be automatically pushed to Codefresh registry and there’s no need to specify the [Codefresh Docker Registry](https://docs.codefresh.io/v1.0/docs/codefresh-registry) for the block __Push to Docker Registry__ in the pipeline of repository and you can just skip this step.

Click on ___Repositories___, and then click on the ___Pipelines___ gear.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/19.png)

Scroll down to ___Workflow___, and you will see a ___Push to Docker___ button. If you have set up your credentials, click ___Save___ at the bottom of the screen. Otherwise- click on the ___integration page___ link.

Write your User/Password info, and click ___Save___ to connect.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/20.png)


## Unit test your image
Let's head over to ___Piplines___ again.
![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/19.png)

Scroll down to Workflow under ___Build and Unit Test___

We'll type in ```echo $(date)``` in the Unit Test Script area. This will print the date, and we'll be able to see our test in action.

Let's click ___Save___, and ___Build___ to see it in action.

Great- the date has been printed!

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/22.png)


Now let's add a full composition that also contains mongo db.


## Add composition

Our Let's Chat app needs mongo in order to work, so let's add it!

You can read more about compositions in our docs, but we will also walk through the process here :
https://docs.codefresh.io/docs/create-composition


Click the ___Composition___ view icon in the left pane, and click the ___Add Composition___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/1.png)

Choose a name for your composition

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/2.png)

We are going to build our comp from scrath, so click ___Empty Composition___

![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/empty_comp.png)

Now we will click ___Add Service___ and add demochat, the port (50000), and mongo.
Everything looks good here- so let's go ahead and launch by clicking the rocket ship...

![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/savelaunch_final.png)


Once it has completed, a link to our app will be displayed. Let's click it to see if it worked.


![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/completed_in.png)

Success! We have successfully launched a composition.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/10.png)






[app]: https://github.com/containers101/demochat

## About Containers 101

[Containers 101](https://www.meetup.com/Containers-101-meetup/) is online/offline meetup group based in Mountain View that provides guides and helps developers work with Containers. Created by [Codefresh](https://codefresh.io/) which provides environments for every commit, Docker CI and CD, and an embedded registry.

[Join Containers 101](https://www.meetup.com/Containers-101-meetup/)
Learn more about [Codefresh](https://codefresh.io/)


46 changes: 46 additions & 0 deletions annotation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '1.0'
steps:
BuildingDockerImage:
title: Building Docker Image
type: build
image_name: demochat
working_directory: ./
dockerfile: Dockerfile
metadata: # Declare the metadata attribute
set: # Specify the set operation
- Unit_Test: true
- API_Test: true
- Ave_Res_Time: 2 msec
- Packet_Loss: 0
- Security: true
# RunningUnitTests:
# title: Running Unit Tests
# type: composition
# composition: 5959cfa8e82afd0001bb2f1c
# composition_candidates:
# demochat:
# image: '${{BuildingDockerImage}}'
# entrypoint: sh /codefresh/volume/cf-generated/unit_test_script
# volumes:
# - '${{CF_VOLUME_NAME}}:/codefresh/volume'
# add_flow_volume_to_composition: true
# create_file:
# path: /codefresh/volume/cf-generated
# name: unit_test_script
# content: npm test
# on_success:
# metadata:
# set:
# - '${{BuildingDockerImage.imageId}}':
# - CF_QUALITY: true
# - Unit Test: true
# - API Test: true
# - Performance: Average Response Time 2msec
# - Performance: 0 Packet Loss
# - Security: true
# on_fail:
# metadata:
# set:
# - '${{BuildingDockerImage.imageId}}':
# - CF_QUALITY: false

Loading