Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5f8d1a7
Create openapphack_project_submission_template.md
panickervinod Feb 9, 2016
ea38c05
Update openapphack_project_submission_template.md
panickervinod Feb 9, 2016
5d1f80a
Update openapphack_project_submission_template.md
panickervinod Feb 9, 2016
b99b491
removed java dependency
panickervinod Feb 11, 2016
78b1c1d
Update README.md
panickervinod Feb 11, 2016
2c3c2c5
Update README.md
panickervinod Feb 11, 2016
59705b4
Update README.md
panickervinod Feb 15, 2016
86a019f
Update README.md
panickervinod Feb 16, 2016
adf4dde
Update README.md
panickervinod Mar 24, 2016
fc2b021
Update README.md
panickervinod Mar 24, 2016
3237022
Reorganizing openapphack project
panickervinod May 12, 2016
b309f0f
Update README.md
panickervinod May 12, 2016
2351a43
Update README.md
panickervinod May 12, 2016
94565cb
Update README.md
panickervinod May 12, 2016
1115701
Update README.md
panickervinod May 13, 2016
47f3f7d
Update README.md
panickervinod May 13, 2016
86c1123
Update README.md
panickervinod May 18, 2016
5139288
Update README.md
panickervinod May 18, 2016
74cc667
Update README.md
panickervinod May 18, 2016
2c51f35
Update README.md
panickervinod May 18, 2016
47b576c
Update README.md
panickervinod May 18, 2016
5a08e14
Update README.md
panickervinod May 19, 2016
8870c85
Update README.md
panickervinod Jun 9, 2016
542e182
Update README.md
panickervinod Jun 9, 2016
ea7328b
Update README.md
panickervinod Jun 9, 2016
e136357
Update README.md
panickervinod Jun 9, 2016
56f613d
Update README.md
panickervinod Jun 9, 2016
f11f088
Update README.md
panickervinod Jun 9, 2016
5f6e2cf
Update README.md
panickervinod Jun 9, 2016
b166e06
reorganized for electronapp
panickervinod Jun 15, 2016
3ea06cd
Merge pull request #28 from panickervinod/openapphack-electronapp
panickervinod Jun 15, 2016
9c0c0ff
added oah scripts
panickervinod Jun 15, 2016
7f2e0e5
Rename openapphack_project_submission_template.md to openapphack_repo…
panickervinod Jun 16, 2016
78b70c8
updated design
panickervinod Jun 24, 2016
9f0a334
Merge pull request #29 from panickervinod/openapphack-electronapp
panickervinod Jun 24, 2016
9ad4b8d
Update TODO.md
panickervinod Jul 25, 2016
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
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "launcher"]
path = launcher
url = https://github.com/WiproOpenSourcePractice/openapphack-launcher.git
[submodule "shell"]
path = shell
url = https://github.com/WiproOpenSourcePractice/openapphack-shell.git
[submodule "tools/generators"]
path = tools/generators
url = https://github.com/WiproOpenSourcePractice/generator-openapphack.git
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM dockerfile/java
FROM dockerfile/ansible

# Copy all here
RUN mkdir -p /usr/src/app
ADD . /usr/src/app
WORKDIR /usr/src/app
RUN mkdir -p /usr/src/oah
ADD . /usr/src/oah
WORKDIR /usr/src/oah

CMD ["./gradlew"]
CMD ["./bin/install.sh"]
115 changes: 77 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,117 @@

[![Join the chat at https://gitter.im/WiproOpenSourcePractice/openapphack](https://badges.gitter.im/WiproOpenSourcePractice/openapphack.svg)](https://gitter.im/WiproOpenSourcePractice/openapphack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Openapphack is an attempt to enable end to end automation of Application Development using opensource tools for provisioning , code authoring and scaffolding.
Openapphack is an opensource application aggregrator.

Openapphack leverages vagrant, ansible and yeoman to do this.
Simplifies experimenting with opensource application . OpenAppHack projects can be used for testing and rapid prototyping of opensource solutions . OpenAppHack projects can also be run on low cost RPI cluster

The goal is to get a collection of fully functional , customizable apps working on the [openapphack-vm](https://github.com/WiproOpenSourcePractice/openapphack-vm) from a set of plain `yaml` files.

The broader purpose is to provide a simplified path for full stack developers to quickly get started on opensource technologies and experiment freely.
The broader purpose is to provide a simplified path for full stack developers to quickly get started on opensource applications and experiment freely on deciding which opensource applications should be considered for building an opensource solution.

### Index

- [What is OpenAppHack Project?](https://github.com/WiproOpenSourcePractice/openapphack#what-is-openapphack-project)
- [Openapphack repositories](https://github.com/WiproOpenSourcePractice/openapphack#openapphack-repositories)
- [Contributing to this project](https://github.com/WiproOpenSourcePractice/openapphack#contributing-to-this-project)
- [How do you start your openapphack-project?](https://github.com/WiproOpenSourcePractice/openapphack#how-do-you-start-your-openapphack-project)
- [How do you customize your openapphack-project?](https://github.com/WiproOpenSourcePractice/openapphack#how-do-you-customize-your-openapphack-project)
- [How do you test your openapphack-project?](https://github.com/WiproOpenSourcePractice/openapphack#how-do-you-test-your-openapphack-project)
- [How do you submit your openapphack-project?](https://github.com/WiproOpenSourcePractice/openapphack#how-do-you-submit-your-openapphack-project)

- [What is OpenAppHack Project?](https://github.com/WiproOpenSourcePractice/openapphack#what-is-openapphack-vm-project)
- [Openapphack subprojects and repositories ](https://github.com/WiproOpenSourcePractice/openapphack#openapphack-subprojects-and-repositories )
- [Openapphack Template Projects](https://github.com/WiproOpenSourcePractice/openapphack#openapphack-template-projects)
- [Openapphack Extension Projects](https://github.com/WiproOpenSourcePractice/openapphack#openapphack-extension-projects)
- [Openapphack PI Cluster](https://github.com/WiproOpenSourcePractice/openapphack#openapphack-pi-cluster)

### What is OpenAppHack Project?

An **OpenAppHack Project** is a repository forked from the [openapphack-vm](https://github.com/WiproOpenSourcePractice/openapphack-vm) to your github organization or individual namespace.
An openapphack project is a git repository derived from one of the openapphack vm or cluster project templates

You need to make use of the openapphack [ansible](http://www.ansible.com/) roles and openapphack [yeoman](http://yeoman.io/) generators and build an impressive fully functional opensource application.
Openapphack and its subprojects help aggregate ,validate and test github repositories that derived from openapphack-vm, openapphack-cluster, openapphack-pi-vm, openapphack-pi-cluster repositories

***
Openapphack also enables end to end automation of application deployment which can be leveraged for prototyping and distributed deployment of opensource applications .

### Openapphack repositories
Openapphack uses opensource tools for provisioning , code authoring and scaffolding.

The others repositories used by the openapphack project are:
The project templates are

[**Openapphack-vm**](https://github.com/WiproOpenSourcePractice/openapphack-vm) : Main repository which participants have to fork and will submit their pull requests.
- openapphack-vm : Template used for setting up a single openapphack vm.
- openapphack-pi-vm :Template used for setting up a single openapphack vm on RPI's.
- openapphack-cluster : Template used for setting up multi or load balanced/ HA cluster for the application.
- openapphack-pi-cluster : Template used for setting up multi or load balanced /HA cluster on openapphack RPI cluster.

[**Openapphack-ansible-roles**](https://github.com/WiproOpenSourcePractice/openapphack-ansible-roles) : Repository for ansible roles that can be used by openapphack projects, You can also add your own ansible roles that work on openapphack-vm
All openapphack projects github repositories must follows a naming convention and github repository names must end with either an xxx-vm, xxx-pi-vm ,xxx-pi-cluster or xxx-cluster to be picked up by the openapphack for analysis and testing.

[**Openapphack-yeoman-generators**](https://github.com/WiproOpenSourcePractice/openapphack-yeoman-generators) : Repository for the generators. You can also add your own yeoman generators that work on openapphack-vm, [more info](https://github.com/WiproOpenSourcePractice/openapphack-yeoman-generators/wiki/Openapphack-Yeoman-Generators)
Openapphack-vms/clusters leverages vagrant, ansible ,yeoman,virtualbox and docker for automation.

***

### Contributing to this project

You can start contributing to this project by starting your own openapphack project as mentioned below.
### Openapphack subprojects and repositories

**Openapphack core projects**

[**Openapphack-shell(oah)**](https://github.com/WiproOpenSourcePractice/openapphack-shell) : Shell for openapphack..

[**OpenAppHack-launcher(oah-app)**](): Openapphack Launcher

[**Openapphack-stats**](https://github.com/WiproOpenSourcePractice/openapphack-stats) : The repository that will be updated periodically with test results and details from validated openapphack-vm/clusters..

#### **Openapphack Template Projects**

[**Openapphack-vm**](https://github.com/WiproOpenSourcePractice/openapphack-vm) : The repository from which all openapphack-xxx-vm repos are derived.

[**Openapphack-cluster**](https://github.com/WiproOpenSourcePractice/openapphack-cluster) : The repository from which all openapphack-xxx-cluster repos are derived..

[**Openapphack-pi-vm**](https://github.com/WiproOpenSourcePractice/openapphack-pi-vm) : The repository from which all openapphack-xxx-pi-vm repos are derived.

#### How do you start your openapphack-project?
[**Openapphack-pi-cluster**](https://github.com/WiproOpenSourcePractice/openapphack-pi-cluster) : The repository from which all openapphack-xxx-pi-cluster repos are derived..

You begin by forking an [openapphack-vm](https://github.com/WiproOpenSourcePractice/openapphack-vm/) and follow the instructions mentioned [here](https://github.com/WiproOpenSourcePractice/openapphack-vm/blob/master/README.md)
##### **Openapphack Extension Projects**

#### How do you customize your openapphack-project?
This includes the various git repositories

You are free to tweak the vm configurations as long as the base vagrant box and the openapphack vm folder structure is maintained. Any additional customization must be done only in the `yaml` files.
- openapphack-XXXX-launcher-plugins(oah-launcher-plugins),
- ansible-role-openapphack-XXXX (oah-ansible-roles),
- openapphack-XXXX-vm (oah-vms),
- openapphack-XXXX-cluster (oah-clusters),
- openapphack-XXXX-recipes (oah-recipes),
- openapphack-XXXX-pi-cluster (oah-pi-clusters),
- openapphack-XXXX-pi-vm (oah-pi-vms)

You are also free to add (**only add**) and include your own yeoman generator and ansible roles as long as they work together on the openapphack-vm.
#### **Openapphack dev tools projects**

Please take a look [here](https://github.com/WiproOpenSourcePractice/openapphack-ansible-roles/wiki/Openapphack-Ansible-Roles) , on how to add your own openapphack ansible role
[**Openapphack-ansible-roles**](https://github.com/WiproOpenSourcePractice/openapphack-ansible-roles) : Repository used to organize all openapphack ansible roles . These can be used by openapphack projects, You can also add your own ansible roles that work on openapphack-vm

Please take a look [here](https://github.com/WiproOpenSourcePractice/openapphack-yeoman-generators/wiki/Openapphack-Yeoman-Generators) , on how to add your own openapphack yeoman generator
[**Openapphack-yeoman-generators**](https://github.com/WiproOpenSourcePractice/openapphack-yeoman-generators) : Repository used to organize all yeoman generators used by openapphack vm/clusters. You can also add your own yeoman generators that work on openapphack-vm, [more info](https://github.com/WiproOpenSourcePractice/openapphack-yeoman-generators/wiki/Openapphack-Yeoman-Generators)

#### How do you test your openapphack-project?
[**generator-openapphack**](https://github.com/WiproOpenSourcePractice/generator-openapphack) : Yeoman generator to generate openapphack vms/clusters , would be reorganized under openapphack-tools..

clone your `openapphack-vm` associated with your githubid or org and run vagrant up , vagrant provision.
***
### Openapphack PI Cluster

You should be able to validate and test your vm.
An openapphack-pi-cluster can be used to test your openapphack pi-vm/cluster projects

#### How do you submit your openapphack-project? ###
![Image of a DIY openapphack pi cluster](https://cloud.githubusercontent.com/assets/8347838/15924963/ab4d9504-2e52-11e6-8e04-c58c2bcb0fb2.png)

You will have to submit a pull request to [openapphack repository](https://github.com/WiproOpenSourcePractice/openapphack) to do so.
### Contributing to this project

If you are unsure on how to make a pull request. Please refer [github's guide on creating a pull request](https://help.github.com/articles/creating-a-pull-request/)
You can start contributing to this project by joining in on any of the openapphack projects mentioned above.

Do mention your github repository url and details of any ansible or yeoman generators you have included to get your openapphack project working.
#### How do you start your openapphack project?

This section is currently being revamped as openapphack project is being reorganized to enable greated community participation.

Please join the community @ https://groups.google.com/forum/#!forum/openapphack.
Please join the community @ https://groups.google.com/forum/#!forum/openapphack , to know more about the project.

If you have any questions/suggestions please email to [[email protected]](mailto:[email protected])

#### Interested in going the extra mile :

If you want to contribute to the development of openapphack main project please do take a look at the [issues](https://github.com/WiproOpenSourcePractice/openapphack/issues)

You can get details on the branching model that will be followed [here] (http://nvie.com/posts/a-successful-git-branching-model/) ,


## License

This project is licensed under the MIT open source license.

## Credits

Still compiling this.. Lot of Folks to thank, we are standing on the shoulders of a lot of excellant programmers and a lot of opensource projects.

here is a [list](https://github.com/WiproOpenSourcePractice/openapphack/wiki/Opensource-Projects-that-got-us-where-we-are-,-and-keeps-us-inspired-to-do-more..)..

5 changes: 5 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Refactoring TODOs

a) Refactor openapphack as a toplevel ansible project , that is also an ansible role to install openapphack depending on where openapphack is being installed


151 changes: 151 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
#!/bin/bash

# Global variables
OPENAPPHACK_SERVICE="http://wiproopensourcepractice.github.io/openapphack/"
OPENAPPHACK_VERSION="0.0.1"
#OPENAPPHACK_DIR="${0%/*/*}"
OPENAPPHACK_DIR="${HOME}/.ove"

# Local variables
openapphack_bin_folder="${OPENAPPHACK_DIR}/bin"
openapphack_tmp_folder="${OPENAPPHACK_DIR}/tmp"
openapphack_stage_folder="${openapphack_tmp_folder}/stage"
openapphack_etc_folder="${OPENAPPHACK_DIR}/etc"
openapphack_var_folder="${OPENAPPHACK_DIR}/var"
openapphack_config_file="${openapphack_etc_folder}/config"
openapphack_bash_profile="${HOME}/.bash_profile"
openapphack_profile="${HOME}/.profile"
openapphack_bashrc="${HOME}/.bashrc"
openapphack_zshrc="${HOME}/.zshrc"
openapphack_platform=$(uname)

openapphack_init_snippet=$( cat << EOF
#THIS MUST BE AT THE END OF THE FILE FOR OPENAPPHACK CLI TO WORK!!!
[[ -s "${OPENAPPHACK_DIR}/bin/oah-init.sh" ]] && source "${OPENAPPHACK_DIR}/bin/oah-init.sh"
EOF
)


echo ' '
echo 'Thanks for using OPENAPPHACK '
echo ' '
echo ' '
echo ' Will now attempt installing...'
echo ' '


# Sanity checks

echo "Looking for a previous installation of OPENAPPHACK..."
if [ -d "${OPENAPPHACK_DIR}" ]; then
echo "OPENAPPHACK found."
echo ""
echo "======================================================================================================"
echo " You already have OPENAPPHACK installed."
echo " OPENAPPHACK was found at:"
echo ""
echo " ${OPENAPPHACK_DIR}"
echo ""
echo " Please consider running the following if you need to upgrade."
echo ""
echo " $ oah selfupdate"
echo ""
echo "======================================================================================================"
echo ""
exit 0
fi

echo "Looking for git..."
if [ -z $(which git) ]; then
echo "Not found."
echo ""
echo "======================================================================================================"
echo " Please install git on your system using your favourite package manager."
echo ""
echo " OPENAPPHACK uses git for crucial interactions with it's github repos."
echo ""
echo " Restart after installing git."
echo "======================================================================================================"
echo ""
exit 0
fi

echo "Looking for unzip..."
if [ -z $(which unzip) ]; then
echo "Not found."
echo "======================================================================================================"
echo " Please install unzip on your system using your favourite package manager."
echo ""
echo " Restart after installing unzip."
echo "======================================================================================================"
echo ""
exit 0
fi


echo "Looking for curl..."
if [ -z $(which curl) ]; then
echo "Not found."
echo ""
echo "======================================================================================================"
echo " Please install curl on your system using your favourite package manager."
echo ""
echo " OPENAPPHACK uses curl for crucial interactions with it's github pages."
echo ""
echo " Restart after installing curl."
echo "======================================================================================================"
echo ""
exit 0
fi

echo "Looking for sed..."
if [ -z $(which sed) ]; then
echo "Not found."
echo ""
echo "======================================================================================================"
echo " Please install sed on your system using your favourite package manager."
echo ""
echo " OPENAPPHACK uses sed extensively."
echo ""
echo " Restart after installing sed."
echo "======================================================================================================"
echo ""
exit 0
fi


echo "Looking for vagrant..."
if [ -z $(which vagrant) ]; then
echo "Not found."
echo ""
echo "======================================================================================================"
echo " Please install vagrant on your system using your favourite package manager."
echo ""
echo " OPENAPPHACK uses vagrant extensively."
echo ""
echo " Restart after installing vagrant."
echo "======================================================================================================"
echo ""
exit 0
fi

echo "Looking for ansible..."
if [ -z $(which ansible) ]; then
echo "Not found."
echo ""
echo "======================================================================================================"
echo " Please install ansible on your system using your favourite package manager."
echo ""
echo " OPENAPPHACK uses ansible extensively."
echo ""
echo " Restart after installing ansible."
echo "======================================================================================================"
echo ""
exit 0
fi

# if hostmachine then vagrant or Docker must be installed
# if client machine disable vagrant up commands
# TODO Set the Global var for OAH_HOST and OAH_CLIENT
ansible-galaxy install -r ../data/requirements.yml
ansible-playbook ../data/setup.yml
Loading