Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
256017a
First working version
mkalioby May 9, 2015
77d7ea7
Merge branch 'master' of github.com:mkalioby/autoDeploy
mkalioby May 9, 2015
cc4f74f
Added sudoers.d step
mkalioby May 9, 2015
6c44ef2
Close #5, Close #6
mkalioby May 10, 2015
fb94810
Closes #16, Closes #15
mkalioby May 11, 2015
379da65
Update YAML.md
mkalioby May 11, 2015
36ca04d
Fixed: location in events is relative to workdir
mkalioby May 11, 2015
f4056ec
Merge branch 'master' of github.com:mkalioby/autoDeploy
mkalioby May 11, 2015
d43334d
Closes #13, Closes 17, Adds a media directory for the uploaded direct…
mkalioby May 12, 2015
b276015
Closes #9
mkalioby May 13, 2015
c834a88
Fixed: Issue in the theme
mkalioby May 13, 2015
9c98dfd
Closes #2, #12
mkalioby May 14, 2015
daa30ba
Closes #14
mkalioby May 15, 2015
6cefa22
Closes #1, Closes #14
mkalioby May 15, 2015
f3d567b
Closes #19
mkalioby May 15, 2015
e4ee96c
Update README.md
mkalioby May 15, 2015
681ea83
Closes #20
mkalioby May 15, 2015
bde4441
Merge branch 'master' of github.com:mkalioby/autoDeploy
mkalioby May 15, 2015
4a9b3d4
Closes #22
mkalioby May 16, 2015
971f6e7
Closes # 21
mkalioby May 16, 2015
fb9c0e7
Closes #18
mkalioby May 16, 2015
3beab10
Closes #24
mkalioby May 16, 2015
7afc515
Removing .idea folder
mkalioby May 16, 2015
fdb0dd6
Added debug to the server
mkalioby May 16, 2015
bd5196a
Closes #3
mkalioby May 17, 2015
6ff5768
Closes #25, Closes #26
mkalioby May 17, 2015
a3406cd
Closes #23
mkalioby May 18, 2015
8ee8953
Closes #23
mkalioby May 18, 2015
ba8d0d4
Closes #8
mkalioby May 18, 2015
96fefd1
Close #10
mkalioby May 18, 2015
4bab9d9
Closes #3
mkalioby May 19, 2015
f95b417
Closes #7
mkalioby May 19, 2015
af72dbe
closes #4
mkalioby May 19, 2015
2b2471f
Some Errors Fixing
mkalioby May 19, 2015
baeccaa
Fixed Table Headings
mkalioby May 19, 2015
a3d56e9
Update Installation.md
mkalioby May 20, 2015
118318e
Bug Fix
mkalioby May 20, 2015
dc3772b
Merge branch 'master' of github.com:mkalioby/autoDeploy
mkalioby May 20, 2015
3cb0337
Second set of issues
mkalioby May 20, 2015
c41db4f
Fixed some issues
mkalioby May 20, 2015
c5c8ffb
Fixed: Issue during login
mkalioby May 20, 2015
a03862b
Fixed Issues
mkalioby May 20, 2015
5b0851c
Fixed Broken Commits
mkalioby May 20, 2015
cd43749
Fixed Issue in Tags refresh
mkalioby May 22, 2015
b5f7811
Created JIRA Communicator #27
mkalioby May 23, 2015
6e6f5ff
Added Plugins to the menu
mkalioby May 23, 2015
f233e2c
Update README.md
mkalioby Jun 1, 2015
b5eeb99
Update Installation.md
mkalioby Jun 4, 2015
d17d257
Update Installation.md
mkalioby Jun 4, 2015
b3b8bc7
Fixed issue in login
mkalioby Jul 7, 2015
f97a845
Added Emails to be sent to users when new version deployed
mkalioby Aug 17, 2015
e1ec832
Fixed issue when add email users
mkalioby Aug 17, 2015
804d614
Make send a single mail rather than different mails
mkalioby Aug 18, 2015
e7bce50
Fixed: Sending Emails
mkalioby Aug 22, 2015
94f8b9b
Fixed issue in history in case of tags
mkalioby Aug 22, 2015
ed09bf4
Fixed Issue with multiple checks that may cause too many connections
mkalioby Sep 10, 2015
c47bc0b
Fixed: Modify SSH Key, Set Default Server
mkalioby May 14, 2016
eba023b
Fixes #34, Fixes #35
mkalioby May 14, 2016
d86ffef
Sending Changes to the users by email
mkalioby May 14, 2016
8000d67
Update Installation.md
mkalioby May 14, 2016
a9ddf91
Update Installation.md
mkalioby May 14, 2016
025cb12
Add Stackshare
mkalioby Jul 2, 2016
1a158b0
Update README.md
mkalioby Jul 2, 2016
0ea60d2
Merge pull request #36 from mkalioby/Send_Changes
mkalioby Jul 2, 2016
d4ecf80
Fixing issue where server can't detect EOM
mkalioby Oct 11, 2016
fdb7fd9
Merge branch 'master' of github.com:mkalioby/AutoDeploy
mkalioby Oct 11, 2016
d395df7
Added deployed Column
Sep 17, 2017
ca63b93
Moved to Django Emailer
Sep 18, 2017
e972b65
Handle an error when this is the first deployment
Nov 22, 2017
82c86a7
List number of commits to return by a config
Nov 23, 2017
6d74df1
Full Bootstrap support, added Default Branch
Nov 23, 2017
c86fec3
permissions added
mahmoodnasr Aug 12, 2018
ddb83b2
Adding Admin Static content, add all models to admin
Oct 9, 2018
3ef02f1
Handling issues during Admin Registeration
Oct 9, 2018
370348f
Showing Users Projects
Oct 9, 2018
65d9105
Update Plural Names
Oct 9, 2018
3ef04c3
Update Plural Names
Oct 9, 2018
7af32bf
Adding Ignore-stderr
Oct 11, 2018
8741a6f
Adding Ignore-stderr #2
Oct 11, 2018
b9b1f9c
Adding Ignore-stderr #2
Oct 11, 2018
d3a6a10
Adding Ignore-stderr #3
Oct 11, 2018
9a125c2
Adding Ignore-stderr #4
Oct 11, 2018
4acc5bb
Adding Ignore-stderr #6
Oct 11, 2018
0598654
Some Fixes
mkalioby Jan 15, 2019
f863444
Final Fixes
mkalioby Jan 15, 2019
1b40f51
Restructe Templates
mkalioby Jan 18, 2019
5f1d94b
Added django-mfa2
mkalioby Jan 18, 2019
6e3e958
Allowing Title to be changed from Setting file
Jan 20, 2019
1b657ea
Merged master
Jan 20, 2019
7101258
Removing Updates Available
mkalioby Jan 20, 2019
c205449
Merge branch 'MFA'
mkalioby Jan 20, 2019
db07854
Update requirments.txt
mkalioby Feb 13, 2019
1daf95c
Update requirments.txt
mkalioby Feb 6, 2020
63a328c
Update urls.py
mkalioby Feb 6, 2020
dc49792
Add PyYaml to requirements
mkalioby Feb 6, 2020
e13d3e3
Update Installation.md
mkalioby Jun 18, 2020
d6a7c54
Update requirments.txt
mkalioby Jun 18, 2020
b22da8d
Update requirments.txt
mkalioby Jun 18, 2020
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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

.idea*
# C extensions
*.so

Expand Down
52 changes: 48 additions & 4 deletions Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,56 @@

This document shows how to install autoDeploy on Ubuntu System

1. Create an autodeploy user
# Install Server

* Create an autodeploy user
```sh
# adduser --system --home /opt/autodeploy/home --shell /bin/bash autodeploy
```
2. Add autodeploy to admins.
* Add autodeploy to sudoers.
```sh
# adduser autodeploy sudo
```
* Download The latest release from [github](https://github.com/mkalioby/AutoDeploy/releases)
* Expand the downloaded archive to '/opt/autodeploy/home'
* Copy the file in UnixConfig to /etc/sudoers.d/

* Install the Client Library
```sh
# cd client; python setup.py install
```

* Edit Server init script so that it points to installation directory

* Copy server init script to /etc/init.d
* Add the init script to the start defaults
```sh
# update-rc.d autodeploy-server start
```

# Install Web Application

* Install required Packages
```sh
# adduser autodeploy adm
# pip install django==1.8 django-tables2==1.0.4 django-tables2-reports
```
3.

* Configure your database
* Create empty database in your DBMS.
* Edit Settings file in `webapp/autoDeploy/settings.py`.

* Create Database by
```sh
$ python manage.py migrate
```
1. Start Django Sever
```sh
python manage.py runserver IP:PORT
```

TBD: A Guide to show how to configure autodeploy Django webapp with Apache should be done.





24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# autoDeploy
Trying to build an automated deployment system which is similar to AWS CodeDeploy.
# AutoDeploy

[![StackShare](http://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](http://stackshare.io/mkalioby/autodeploy)

An automated deployment system which is similar to AWS CodeDeploy but is hostable inside an enterprise.

The target is to minimize the manual prone errors of code deployment.

Expand All @@ -8,26 +11,33 @@ The project will have the following componemts:
* **Deployment Client** (which can communicate with the server giving it the scripts to run).
* **Deployment Interface** (to see the progress and it can be used to deploy certain code versions).

The deployment configuration will be based on YAML Format, the multiple values can be seprated by ','.
The deployment configuration will be based on YAML Format.

The client should be callable from CI systems (like Jenkins) to deploy the code after a successful build.

##Events:##

The following events will be handled by the system:

1. **Before Install**: This event will run after the code is downloaded, normal will be used to stop servers/decrypt files
1. **beforeInstall**: This event will run after the code is downloaded, normal will be used to stop servers/decrypt files
2. **Install**: doing the deployment operation itself
3. **After Install**: Actions required after Installing like reloading a server.
3. **afterInstall**: Actions required after Installing like reloading a server.
4. **Validation**: An optiomal step to make sure that everything is OK.

Every event should have the following format:

```yaml
events:
event-name
location: script-location (can be seprated by ',')
runas: user-name
- location: script-location
runas: user-name
```
## Requirments ##
### For the Server:
* pyyaml (>3.0)
* pycrypto

### For the web-application
* django 1.8.1+
* django-table-2
* django-table-report
1 change: 1 addition & 0 deletions Unixconfig/autodeploy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
autodeploy ALL=NOPASSWD: ALL
4 changes: 2 additions & 2 deletions YAML.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ It should be in the following format:

```yaml
beforeInstall:
- location: /home/mohamed/autoDeploy/autoDeploy/exampleConfig/EventsHandler/delDir.sh
- location: EventsHandler/delDir.sh
run-as: www-data
interpreter: bash
```

+ **location**: the full path of the script to run.
+ **location**: the relative path of the script to run.
+ **run-as**: the username of the user who will run this command (optional).
+ **interpreter**: the name of the interpreter that should be used to run the script (optional but highly recommended)

1 change: 1 addition & 0 deletions autodeploy-jira/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__author__ = 'mohamed'
29 changes: 29 additions & 0 deletions autodeploy-jira/jira-client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
__author__ = 'mohamed'

from jira.client import JIRA

class jiraClient():
server=""
username=""
password=""

def __init__(self,server,username,password):
self.server=server
self.username=username
self.password=password

def getProjects(self):
options = {'server': self.server}

jira = JIRA(options,basic_auth=(self.username, self.password)) # a username/password tuple

# Get the mutable application properties for this server (requires jira-system-administrators permission)
props = jira.application_properties()
projects = jira.projects()
return projects
def getProjectKeys(self):
return [project.key for project in self.getProjects()]

if __name__=="__main__":
c=jiraClient("http://shgp.kfshrc.edu.sa/jira",'mkalioby','wanted85')
print c.getProjectKeys()
Empty file added client/__init__.py
Empty file.
53 changes: 53 additions & 0 deletions client/autodeploy_client/.svn/all-wcprops
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
K 25
svn:wc:ra_dav:version-url
V 39
/!svn/ver/433/crawl/client/trunk/Client
END
Client.py
K 25
svn:wc:ra_dav:version-url
V 49
/!svn/ver/433/crawl/client/trunk/Client/Client.py
END
__init__.py
K 25
svn:wc:ra_dav:version-url
V 51
/!svn/ver/433/crawl/client/trunk/Client/__init__.py
END
Config.py
K 25
svn:wc:ra_dav:version-url
V 49
/!svn/ver/433/crawl/client/trunk/Client/Config.py
END
README
K 25
svn:wc:ra_dav:version-url
V 46
/!svn/ver/433/crawl/client/trunk/Client/README
END
Common.py
K 25
svn:wc:ra_dav:version-url
V 49
/!svn/ver/433/crawl/client/trunk/Client/Common.py
END
ClientJob.py
K 25
svn:wc:ra_dav:version-url
V 52
/!svn/ver/433/crawl/client/trunk/Client/ClientJob.py
END
Connect.py
K 25
svn:wc:ra_dav:version-url
V 50
/!svn/ver/433/crawl/client/trunk/Client/Connect.py
END
config.cfg
K 25
svn:wc:ra_dav:version-url
V 50
/!svn/ver/433/crawl/client/trunk/Client/config.cfg
END
Loading