devops's People
Forkers
ectsangdevops's Issues
should not be running as 'root'
requiring sudo for the tasks changes numerous environment of the instance
- sourcing env variables via ~/.profile
- install & running node
- etc
ansible should take AWS credential from devops-vars.yml
currently ec2 module in aws.yml playbook take AWS credential from environment variables, which means that we have to change environment variables every time we work on different projects
and place AWS credentials at #38
Setup Nginx to xxx.altitudelabs.com (Godaddy)
vm open port number
godaddy alias (or a record) point to ip address
nginx server block in sites_available for port number to xxx.altitudelabs.com
Nginx config file should handle 301 redirect
like
server {
listen 80;
server_name 54.179.128.50;
return 301 $scheme://altitudelabs.com$request_uri;
}
server {
listen 80;
server_name www.altitudelabs.com;
return 301 $scheme://altitudelabs.com$request_uri;
}
chmod u+x deploy.sh may have conflict during git pull
No response(success or not) from github webhook
Abstract such that projects can use this repo as git submodule
- Abstract variables into env_vars folder for global variables that will be used in roles
- Deploy-node-app role should be able to deploy Ghost blog from specified git repo. Create a bare repo with a post-receive hook such that user can type git push staging master to deploy app
Steps in Ansible:
- create folder
/home/ubuntu/repos/{{project_name}}
- cd
/home/ubuntu/repos/{{project_name}}
git --bare init
- copy post-receive template to
/home/ubuntu/repos/{{project_name}}/hooks/post-receive
- create folder
/home/ubuntu/{{ project_name }}
Then to deploy from local computer, do:
git remote add deploy ubuntu@{{ instance_ip }}:/home/ubuntu/repos/{{ project_name }}
git push deploy master --force
- Deploy-blog should be able to deploy Ghost blog from specified git repo using similar method
- Should install gulp, grunt, ruby, sass, bower (see issue #1)
AWS EC2 instance sync
Allow to create new group of instance easily, like
./devops add vms-group-a 5
to create 5 ec2 instances as vms-group-a.
do sync with EC2 with
./devops sync
or/and do sync with EC2 before running reprovision playbook,
- get list of instances from ec2 with same project name
- see if there are new groups which is not in devops-host, add new groups
- see if there are old groups which is not exist in AWS ec2, remove from devops-host
- Update host list for each group
- Warn the user if his target host group is not exist anymore
Allow project specific ansible playbooks
now all playbooks are bounded to devops proj
however devops proj should only provide general playbooks as library
proj itself should be able to contain its own playbooks
config yml structure is wrong
node:
npm:
should be
node:
npm:
webhook to staging (Github)
setting env_var in bashrc is not working
Install dev (npm install)
Run mocha test script when deployment
Keep the test log result in a file, and print it through ansible
Add github deploy ssh key need Admin Access Right
Only for the first time, but we should find a better way to do that
Update server time
Do sudo ntpdate time.nist.gov
,
server time may not be updated, and error may occur.
(for example, AWS SES service does not allow request with wrong timestamp.)
devops-ignore.yml file for credentials
like
---
pm2_start_var: >-
PORT={{ nginx_server_port }}
AWS_ACCESS_KEY=xxxxxxx
AWS_SECRET_KEY= xxxxxxx
BRAINTREE_MERCHANT_ID= xxxxxxx
BRAINTREE_PUBLIC_KEY= xxxxxxx
BRAINTREE_PRIVATE_KEY= xxxxxxx
Currently we can do that with ./devops deploy --extra-vars="@../devops-ignore.yml"
But better to have a short shell script to do that
set up ENV_VAR for nginx
except Godaddy, we should handle others domain provider service
Install machine depend
Allow deployment to specific target
now deployment involves all launched hosts
but it should allow deployment to a specific group of hosts, e.g. staging
make devops into git submodule
right now the version control of proj and devops are not sync
should figure out how to make devops into submodule so it wont break the deployment logic whenever devops is updated
Help users install python-boto before they run aws playbook
Missing command
npm install -g grunt-cli
npm install -g grunt
npm install -g gulp
npm install -g bower
sudo apt-get install ruby1.9.1 ruby1.9.1-dev
sudo gem install sass
Set up AWS instance
Able to download repo through github
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.