Skip to content

Develop #3

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

Open
wants to merge 102 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
4ca3023
Update distelli-manifest.yml
doct15 Oct 27, 2015
2e6b5fb
Update distelli-manifest.yml
doct15 Oct 28, 2015
e6c1829
trigger
doct15 Oct 28, 2015
bd3a094
Update distelli-manifest.yml
doct15 Oct 28, 2015
d418758
Update distelli-manifest.yml
doct15 Oct 28, 2015
dcaf0d1
move newrelic up
doct15 Oct 28, 2015
c8a2b5d
Update package.json
doct15 Oct 28, 2015
810b6ff
Update distelli-manifest.yml
doct15 Oct 28, 2015
f11fbe4
Update app.js
doct15 Oct 28, 2015
74443e8
update manifest
doct15 Oct 28, 2015
8deb9d6
manifest updates
doct15 Oct 29, 2015
76e4ef4
update
doct15 Oct 29, 2015
0df8dd1
test
doct15 Oct 29, 2015
3478663
Trigger checkin
doct15 Oct 30, 2015
cd2c7f1
Update distelli-manifest.yml
doct15 Nov 12, 2015
1499331
trigger build
doct15 Nov 12, 2015
27cbf44
Trigger
doct15 Nov 17, 2015
418aba5
Update distelli-manifest.yml
doct15 Nov 21, 2015
8b8a92f
Update distelli-manifest.yml
doct15 Dec 7, 2015
6ebd265
Trigger a build/deploy
doct15 Dec 14, 2015
d608e37
remark out newrelic
doct15 Dec 15, 2015
2f0c974
Fix bad remark
doct15 Dec 15, 2015
e9e4028
simplify manifest
doct15 Dec 17, 2015
9d25878
simplify manifest
doct15 Dec 17, 2015
67adb60
simplify manifest
doct15 Dec 17, 2015
cda2a90
simplify manifest
doct15 Dec 17, 2015
128aba2
simplify manifest
doct15 Dec 17, 2015
9388939
simplify manifest
doct15 Dec 17, 2015
30730e4
update README.md
doct15 Dec 17, 2015
37445ad
Trigger a build 12/17
doct15 Dec 17, 2015
4644efa
Create Dockerfile
doct15 Dec 23, 2015
38e77c2
Update distelli-manifest.yml
doct15 Jan 18, 2016
ed21b78
Update distelli-manifest.yml
doct15 Jan 18, 2016
8b20316
Update distelli-manifest.yml
doct15 Jan 18, 2016
080efe2
trigger build
doct15 Jan 18, 2016
781db8e
Remark docker commands.
doct15 Jan 18, 2016
ba725bc
fix name
doct15 Jan 20, 2016
016ae36
trigger build 1-20
doct15 Jan 20, 2016
1401b2a
trigger build 1-21
doct15 Jan 21, 2016
aef72ee
trigger build 1-21a
doct15 Jan 21, 2016
d3eccab
trigger build 1-29a
doct15 Jan 29, 2016
4d032f0
trigger build 1-29b
doct15 Jan 29, 2016
d6e474f
add --rm=true
doct15 Feb 3, 2016
15988ae
fix name
doct15 Feb 5, 2016
ff5bb61
trigger build 2-5
doct15 Feb 5, 2016
5da0a74
Update distelli-manifest.yml
doct15 Feb 10, 2016
5489003
Update distelli-manifest.yml
doct15 Feb 10, 2016
b05c99d
Update distelli-manifest.yml
doct15 Feb 10, 2016
8bd4ce0
Update distelli-manifest.yml
doct15 Feb 10, 2016
5388d07
Update index.jade
doct15 Feb 10, 2016
46e169b
Update distelli-manifest.yml
doct15 Feb 10, 2016
8ed4087
remove newrelic
doct15 Feb 10, 2016
832542f
Update distelli-manifest.yml
doct15 Feb 10, 2016
db68c20
Create distelli_manifest.rh7.1.yml
doct15 Feb 11, 2016
96746cd
back to ubuntu
doct15 Feb 11, 2016
e468da1
Update old_distelli-manifest.yml
doct15 Feb 12, 2016
9c91d75
trigger a build
doct15 Feb 16, 2016
4ce5daa
Update distelli-manifest.yml
doct15 Mar 1, 2016
9c20dce
Update distelli-manifest.yml
doct15 Mar 1, 2016
48963fe
Update distelli-manifest.yml
doct15 Mar 1, 2016
5bde594
Update distelli-manifest.yml
doct15 Mar 1, 2016
22895fd
Update distelli-manifest.yml
doct15 Mar 1, 2016
8806c71
Update distelli-manifest.yml
doct15 Mar 2, 2016
c81f00e
Update distelli-manifest.yml
doct15 Mar 2, 2016
b309682
Update distelli-manifest.yml
doct15 Mar 3, 2016
8572d43
Update index.jade
doct15 Mar 3, 2016
bb84df1
Update distelli-manifest.yml
doct15 Mar 3, 2016
b719233
Commit a change
doct15 Mar 3, 2016
a319f93
Update index.jade
doct15 Mar 9, 2016
2fe4d0c
vb
doct15 Mar 9, 2016
b077fc0
fix publicip
doct15 Mar 9, 2016
c18997c
change name
doct15 Mar 9, 2016
996de04
Update index.jade
doct15 Mar 10, 2016
2865eaa
clean
doct15 Mar 22, 2016
799f4fa
clean
doct15 Mar 22, 2016
be94468
test
doct15 Mar 22, 2016
aa53df6
Trigger Build Friday
doct15 Mar 25, 2016
a304a39
back to docker
doct15 Apr 8, 2016
99d5c18
back to docker2
doct15 Apr 8, 2016
27304ad
Docker3
doct15 Apr 8, 2016
91197e6
Docker4
doct15 Apr 8, 2016
84a8a13
Docker5
doct15 Apr 8, 2016
b2813b8
Remove docker
doct15 Apr 12, 2016
ea9c44b
Commit Change Demo
doct15 Apr 13, 2016
248d4b6
Update distelli-manifest.yml
doct15 Apr 13, 2016
89ace01
trigger build 4/18
doct15 Apr 18, 2016
be7ab73
2016-04-19 trigger build
doct15 Apr 19, 2016
cd6fae2
trigger build 4/20
doct15 Apr 20, 2016
79af986
2016-04 trigger build
doct15 Apr 25, 2016
c870693
trigger build 5/11
doct15 May 11, 2016
4094f4a
Testing branch pr and commit.
doct15 May 14, 2016
f88fca3
Testing branch pr and commit2.
doct15 May 14, 2016
ae86bb3
testing name develop
doct15 May 14, 2016
d87de1e
test
doct15 Oct 4, 2017
77632c1
test2
doct15 Oct 4, 2017
2d85dbf
test1
doct15 Dec 8, 2017
9a5bdac
testing
doct15 Nov 8, 2018
0e112a4
testing
doct15 Nov 8, 2018
a145a98
testing3
doct15 Nov 8, 2018
823d68b
testing3
doct15 Nov 8, 2018
1d4b28c
testing5
doct15 Nov 8, 2018
e96fa09
testing6
doct15 Nov 8, 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
59 changes: 59 additions & 0 deletions 20160309-distelli-manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
bmcgehee/example-node7:
# Distelli Manifest example

PreBuild:
# Add any build pre-requisites here
#- echo "---PreBuild---"

Build:
# Enter your build steps here!
- echo "---Building---"
- npm install
- echo "--Testing--"
- npm test
#- docker login -u "$DISTELLI_DOCKER_USERNAME" -p "$DISTELLI_DOCKER_PW" -e "$DISTELLI_DOCKER_EMAIL" "$DISTELLI_DOCKER_ENDPOINT"
#- docker build --quiet=false -t "$DISTELLI_DOCKER_REPO" "$DISTELLI_DOCKER_PATH"
#- docker tag "$DISTELLI_DOCKER_REPO" "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"
#- docker push "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"


PkgInclude:
- '*'

###Below is deployment phases

Env:
# Set any environment variables in this section.
# These are available during all phases of a deploy.
- PORT: "3000"
- DISTELLI_INSTALLVIEW: "templates/notset.json"

InstallTemplates:
- "views/index.jade"

PreInstall:
# Use this section to install any deployment pre-requisites.
- echo "---PreInstall---"
#- sudo docker login --rm=true -u "$DISTELLI_DOCKER_USERNAME" -p "$DISTELLI_DOCKER_PW" -e "$DISTELLI_DOCKER_EMAIL" "$DISTELLI_DOCKER_ENDPOINT"
#- echo "--Installing deploy dependencies--"
- echo "-Updating apt-get-"
- sudo apt-get -y update
- echo "-Installing nodejs-"
- sudo apt-get -y install nodejs npm
#- curl --silent --location https://rpm.nodesource.com/setup | sudo bash -
#- sudo yum -y install nodejs
#- sudo yum -y groupinstall 'Development Tools'

PostInstall:
- echo "---PostInstall---"
#- npm install
#- npm test

Exec:
- nodejs app.js
#- sudo docker run "$DISTELLI_DOCKER_PORTS" --rm=true "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"

PostStart:
#- publicip=$(curl -s ident.me)
- 'echo "You can validate the install by pointing your browser at http://PUBLIC_IP:$PORT"'

Empty file added 2018-11-07-testing.txt
Empty file.
Empty file added 2018-11-07-testing2.txt
Empty file.
Empty file added 2018-11-07-testing3.txt
Empty file.
Empty file added 2018-11-07-testing4.txt
Empty file.
Empty file added 2018-11-07-testing5.txt
Empty file.
Empty file added 2018-11-07-testing6.txt
Empty file.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:14.04
RUN apt-get update -y
RUN sudo apt-get -y install nodejs
COPY . /src
EXPOSE 3000
CMD ["nodejs", "/src/app.js"]
40 changes: 11 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Getting Started Building and Deploying with Distelli - NodeJS Example
develop# Getting Started Building and Deploying with Distelli - NodeJS Example

This tutorial will get you setup, building, testing, and deploying an application with Distelli in minutes.

The tutorial assumes you have already:
The tutorial assumes you have already:
* [Created a free Distelli account](https://www.distelli.com/signup)
* Have a login to, at least, one of the two public repositories.
- <a href="https://github.com/" target="_blank">https://github.com/</a>
- <a href="https://bitbucket.org/" target="_blank">https://bitbucket.org/</a>

The scenario also expects that you have a **Destination** server available to do deployments of the example application.

### Step 1. Prepare Server for Deployment
### Step 1. Prepare Server for Deployment

To enable auto deployment of an application you must have a destination server to deploy to.

If you don't have a server you can use a virtual server. For a simple guide to setting up a virtual server using Virtualbox and Vagrant see [Building Virtual Servers](http://docs.distelli.com/docs/building-virtual-servers).

You must install the Distelli agent on the server to facilitate deployments. Instructions on installing the Distelli agent can be found here <a href="http://docs.distelli.com/docs/distelli-agent" target="_blank">Distelli agent reference guide.</a>

Install the agent and return to this document.
Install the agent and return to this document.

### Step 2. Fork and Clone the Repository

Expand Down Expand Up @@ -77,49 +77,31 @@ For example if your username is 'YourUserName' your `distelli-manifest.yml` shou

```
YourUserName/nodejsbuilddeploy:
# Distelli Manifest example
# this example assumes the build and deploy servers are:
# Ubuntu 14.04

PreRelease:
- echo "---Beginning PreRelease---"
- echo "--Installing build dependencies--"
- echo "-Updating apt-get-"
- sudo apt-get -y update
- echo "-Installing nodejs-"
- sudo apt-get -y install nodejs
- echo "-Installing npm-"
- sudo apt-get -y install npm
- echo "--Building--"
- sudo npm install
Build:
- echo "---Building---"
- npm install
- echo "--Testing--"
- npm test

PkgInclude:
- '*'

PkgExclude:
- node_modules/

PreInstall:
- echo "---Begining PreInstall---"
- echo "--Installing deploy dependencies--"
- echo "-Updating apt-get-"
- sudo apt-get -y update
- echo "-Installing nodejs-"
- sudo apt-get -y install nodejs
- echo "-Installing npm-"
- sudo apt-get -y install npm

PostInstall:
- echo "Begin PostInstall"
- npm install


Env:
- PORT: 3000
- PORT: "3000"

Exec:
- /usr/bin/nodejs app.js
- nodejs app.js
```

**Save your change.**
Expand Down
1 change: 0 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ var express = require('express');
var app = express();
var path = require('path');
var bodyParser = require('body-parser');
var newRelic = require('newrelic');

var timeController = require('./controllers/time');
var homeController = require('./controllers/home');
Expand Down
80 changes: 49 additions & 31 deletions distelli-manifest.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,67 @@
bmcghee/example-node:
# Distelli Manifest example
# this example assumes the build and deploy servers are:
# Ubuntu 14.04
bmcgehee/example-node:
# Distelli Manifest example

PreBuild:
# Add any build pre-requisites here
#- echo "---PreBuild---"

#CommitData:
#- RepoType: Git
#- RepoPath: .

Build:
#- echo "DD_USERNAME - $DISTELLI_DOCKER_USERNAME"
#- echo "DD_EMAIL - $DISTELLI_DOCKER_EMAIL"
#- echo "DD_ENDPOINT - $DISTELLI_DOCKER_ENDPOINT"
#- echo "DD_REPO - $DISTELLI_DOCKER_REPO"

# Enter your build steps here!
- echo "---Building---"
- set +e; source /etc/profile; set -e
- nvm install v4.2.1
- npm install
- npm install
- echo "--Testing--"
- npm test

#- docker login -u "$DISTELLI_DOCKER_USERNAME" -p "$DISTELLI_DOCKER_PW" -e "$DISTELLI_DOCKER_EMAIL" "$DISTELLI_DOCKER_ENDPOINT"
#- docker build --quiet=false -t "$DISTELLI_DOCKER_REPO" "$DISTELLI_DOCKER_PATH"
#- docker tag "$DISTELLI_DOCKER_REPO" "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"
#- docker push "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"

PkgInclude:
- '*'

#PkgExclude:
#- node_modules/
###Below is deployment phases

Env:
# Set any environment variables in this section.
# These are available during all phases of a deploy.
- PORT: "3000"
- DISTELLI_INSTALLVIEW: "templates/notset.json"

InstallTemplates:
- "views/index.jade"

PreInstall:
- echo "---Begining PreInstall---"
PreInstall:
# Use this section to install any deployment pre-requisites.
- echo "---PreInstall---"
#- sudo docker login -u "$DISTELLI_DOCKER_USERNAME" -p "$DISTELLI_DOCKER_PW" -e "$DISTELLI_DOCKER_EMAIL" "$DISTELLI_DOCKER_ENDPOINT"
- echo "--Installing deploy dependencies--"
- echo "-Updating apt-get-"
- sudo apt-get -y clean
- sudo apt-get -y update
- echo "-Installing nodejs-"
- sudo apt-get -y install nodejs
- echo "-Installing npm-"
- sudo apt-get -y install npm

InstallTemplates:
- "views/index.jade"

PostInstall:
- echo "Begin PostInstall"
#- npm install
- cp node_modules/newrelic/newrelic.js .
- sed -i "s|license key here|$NR_INSTALL_KEY|g" newrelic.js
- sed -i "s|My Application|$NR_APP_NAME|g" newrelic.js
- echo "---PostInstall---"

Env:
- PORT: "4000"
- DISTELLI_INSTALLVIEW="templates/notset.json"
- NR_INSTALL_SILENT: "TRUE"
- NR_APP_NAME: "NodeJS App"
- NR_INSTALL_KEY: "fc297ee8baef8312725cc134642ab4fce85a7666"
- PORT: "8000"

Exec:
- /usr/bin/nodejs app.js
- nodejs app.js
#- sudo docker run "$DISTELLI_DOCKER_PORTS" --rm=true "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"

PostStart:
- publicip=$(curl -s ident.me) || true
- 'echo "You can validate the install by pointing your browser at http://$publicip:$PORT"'





58 changes: 58 additions & 0 deletions distelli_manifest.rh7.1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
bmcgeheecap1/example-node:
# Distelli Manifest example

PreBuild:
# Add any build pre-requisites here
#- echo "---PreBuild---"

Build:
# Enter your build steps here!
#- echo "---Building---"
#- npm install
#- echo "--Testing--"
#- npm test
#- docker login -u "$DISTELLI_DOCKER_USERNAME" -p "$DISTELLI_DOCKER_PW" -e "$DISTELLI_DOCKER_EMAIL" "$DISTELLI_DOCKER_ENDPOINT"
#- docker build --quiet=false -t "$DISTELLI_DOCKER_REPO" "$DISTELLI_DOCKER_PATH"
#- docker tag "$DISTELLI_DOCKER_REPO" "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"
#- docker push "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"


PkgInclude:
- '*'

###Below is deployment phases

Env:
# Set any environment variables in this section.
# These are available during all phases of a deploy.
- PORT: "3000"
- DISTELLI_INSTALLVIEW: "templates/notset.json"

InstallTemplates:
- "views/index.jade"

PreInstall:
# Use this section to install any deployment pre-requisites.
- echo "---PreInstall---"
#- sudo docker login --rm=true -u "$DISTELLI_DOCKER_USERNAME" -p "$DISTELLI_DOCKER_PW" -e "$DISTELLI_DOCKER_EMAIL" "$DISTELLI_DOCKER_ENDPOINT"
#- echo "--Installing deploy dependencies--"
#- echo "-Updating apt-get-"
#- sudo apt-get -y update
- echo "-Installing nodejs-"
#- sudo apt-get -y install nodejs
- curl --silent --location https://rpm.nodesource.com/setup | sudo bash -
- sudo yum -y install nodejs
- sudo yum -y groupinstall 'Development Tools'

PostInstall:
- echo "---PostInstall---"
- npm install
- npm test

Exec:
- node app.js
#- sudo docker run "$DISTELLI_DOCKER_PORTS" --rm=true "$DISTELLI_DOCKER_REPO:$DISTELLI_BUILDNUM"

PostStart:
- publicip=$(curl -s ident.me)
- 'echo "You can validate the install by pointing your browser at http://$publicip:$PORT"'
55 changes: 55 additions & 0 deletions old_distelli-manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
bmcgehee2/example-node:
# Distelli Manifest example

PreBuild:
- echo "---Preparing for Build---"
- set +e; source /etc/profile; set -e
- nvm install v4.2.1

Build:
- echo "---NVM Use---"
- set +e; source ~/.nvm/nvm.sh; set -e
- nvm use v4.2.1
- echo "---Building---"
- npm install
- cp node_modules/newrelic/newrelic.js .
- sed -i "s|license key here|$NR_INSTALL_KEY|g" newrelic.js
- sed -i "s|My Application|$NR_APP_NAME|g" newrelic.js
- echo "--Testing--"
- npm test

PkgInclude:
- '*'

PreInstall:
- echo "---Begining PreInstall---"
- echo "--Installing deploy dependencies--"
- echo "-Updating apt-get-"
- sudo apt-get -y update
- echo "-Installing nvm pre-requisites-"
- sudo apt-get -y install build-essential libssl-dev curl
- echo "-Installing nvm-"
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.0/install.sh | bash
- set +e; source ~/.nvm/nvm.sh; set -e
- echo "-Installing nodejs-"
- nvm install v4.2.1

InstallTemplates:
- "views/index.jade"

PostInstall:
- echo "Begin PostInstall"

Env:
- DISTELLI_INSTALLVIEW: "templates/notset.json"
- NR_INSTALL_SILENT: "TRUE"
- NR_APP_NAME: "SET_THIS_IN_DISTELLI"
- NR_INSTALL_KEY: "SET_THIS_IN_DISTELLI"
- PORT: "8000"

Exec:
- set +e; source ~/.nvm/nvm.sh; set -e
- nvm use v4.2.1
- node app.js


3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"grunt": "^0.4.5",
"jade": "^1.10.0",
"nodemon": "^1.3.8",
"path": "^0.11.14",
"newrelic": "^1.20.0"
"path": "^0.11.14"
}
}
Empty file added test.20160514a
Empty file.
Empty file added test.20160514a-2
Empty file.
Empty file added test.develop
Empty file.
3 changes: 1 addition & 2 deletions views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ html
body
#message
{{#display_msg}}
<p>Running in the {{this_env}} environment</p>
<p>Testing in the {{this_env}} environment AND THIS IS A TEST 2016-04-20</p>
{{/display_msg}}
#container
h1 Just a Simple Node + Express App
h1 #{date}
a(href="https://www.distelli.com" target="_blank") Built and Deployed by Distelli