-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feature/#59
- Loading branch information
Showing
29 changed files
with
727 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
# Ventorystack: Docker Compose | ||
# python-facebook-chatbot: Docker Compose | ||
# https://docs.docker.com/compose/ | ||
# | ||
# Usage: docker-compose up | ||
version: '3' | ||
services: | ||
chatbot: | ||
|
||
app: | ||
ports: | ||
- "80:8000" | ||
restart: always | ||
image: python:3.6.0 | ||
environment: &environment | ||
- APP_NAME=python-facebook-chatbot | ||
build: | ||
context: . | ||
dockerfile: docker/web/Dockerfile | ||
image: python:2.7.9 | ||
ports: | ||
- "5000:5000" | ||
dockerfile: docker/app/Dockerfile | ||
volumes: | ||
- .:/app | ||
- .:/usr/src | ||
env_file: | ||
- .env | ||
|
||
docs: | ||
restart: always | ||
image: labpositiva/latex:3.6.1 | ||
build: | ||
context: . | ||
dockerfile: docker/docs/Dockerfile | ||
volumes: | ||
- .:/app | ||
env_file: | ||
- .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# python-facebook-chatbot: Docker Compose | ||
# https://docs.docker.com/compose/ | ||
# | ||
# Usage: docker-compose prod up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# python-facebook-chatbot: Docker Compose | ||
# https://docs.docker.com/compose/ | ||
# | ||
# Usage: docker-compose stage up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# python-facebook-chatbot: Docker Compose | ||
# https://docs.docker.com/compose/ | ||
# | ||
# Usage: test up | ||
version: '3' | ||
services: | ||
|
||
app: | ||
environment: &environment | ||
- APP_NAME=python-facebook-chatbot | ||
build: | ||
context: . | ||
dockerfile: docker/app-test/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM python:3.6.0 | ||
|
||
MAINTAINER Luis Mayta <@slovacus> | ||
|
||
COPY ./requirements/ /usr/src/requirements/ | ||
COPY ./requirements.txt /usr/src/requirements.txt | ||
|
||
# set working directory to /app/ | ||
WORKDIR /usr/src | ||
|
||
# install python dependencies | ||
RUN pip install -r /usr/src/requirements/test.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM python:3.6.0 | ||
|
||
MAINTAINER Luis Mayta <@slovacus> | ||
|
||
COPY ./requirements/ /usr/src/requirements/ | ||
COPY ./requirements.txt /usr/src/requirements.txt | ||
|
||
# set working directory to /app/ | ||
WORKDIR /usr/src | ||
|
||
# install python dependencies | ||
RUN pip install -r /usr/src/requirements/dev.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM labpositiva/latex:3.6.1 | ||
MAINTAINER Luis Mayta <@slovacus> | ||
|
||
COPY ./requirements/ /app/requirements/ | ||
COPY ./requirements.txt /app/requirements.txt | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y build-essential | ||
|
||
# set working directory to /app/ | ||
WORKDIR /app | ||
|
||
# Install sphinx dependences | ||
RUN pip install -r /app/requirements/docs.txt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = python -msphinx | ||
SPHINXPROJ = Python-Facebook-Chatbot | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
.. _Rest: http://es.wikipedia.org/wiki/Representational_State_Transfer | ||
.. AWS | ||
.. _ssh: https://en.wikipedia.org/wiki/Secure_Shell | ||
.. _aws route53: https://aws.amazon.com/route53/ | ||
.. _aws elasticache: https://aws.amazon.com/elasticache/ | ||
.. _aws rds: https://aws.amazon.com/rds/ | ||
.. _aws sqs: https://aws.amazon.com/sqs/ | ||
.. _aws dynamodb: https://aws.amazon.com/dynamodb/ | ||
.. _aws elb: https://aws.amazon.com/elasticloadbalancing | ||
.. _aws cloudfront: https://aws.amazon.com/cloudfront/ | ||
.. _aws s3: https://aws.amazon.com/s3/ | ||
.. _aws ec2: https://aws.amazon.com/ec2/ | ||
|
||
.. code developer | ||
.. _cloud computing: https://en.wikipedia.org/wiki/Cloud_computing | ||
.. _git: https://git-scm.com/ | ||
.. _repositorio: https://bitbucket.org/lapositivatd/python-facebook-chatbot | ||
.. _company: https://bitbucket.org/lapositivatd | ||
.. _Python 3.6.0: https://www.python.org/downloads/release/python-360 | ||
.. _Docker: https://www.docker.com/ | ||
.. _Docker Compose: https://docs.docker.com/compose | ||
.. _Django: https://www.djangoproject.com/ | ||
|
||
.. Referencias | ||
.. _La positiva: https://www.lapositiva.com.pe/ | ||
.. _medium.com: https://medium.com | ||
.. _airbnb: https://www.airbnb.com/ | ||
.. _spotify: https://www.spotify.com/ | ||
.. _dropbox: https://www.dropbox.com | ||
|
||
.. Tecnologies | ||
.. _webhook: https://en.wikipedia.org/wiki/Webhook | ||
.. _IoT: https://en.wikipedia.org/wiki/Internet_of_things | ||
.. _DynamoDB: https://aws.amazon.com/dynamodb/ | ||
.. _PostgreSQL: https://www.postgresql.org | ||
.. _RabbitMQ: http://www.rabbitmq.com | ||
.. _Supervisor: http://supervisord.org/index.html | ||
.. _Redis: http://redis.io | ||
.. _ApacheSolr: http://lucene.apache.org/solr | ||
.. _Vagrant: http://www.vagrantup.comhttp://bundler.io/ | ||
.. _GitHub: https://github.com | ||
.. _Bitbucket: https://bitbucket.org | ||
.. _Terraform: https://www.terraform.io/ | ||
.. _Wercker: https://www.wercker.com/ | ||
|
||
|
||
.. Security | ||
.. _oauth2: https://oauth.net/2/ | ||
|
||
.. Extensiones | ||
.. Autores | ||
.. Web Framework | ||
.. Librerias | ||
.. Gestor de Dependencias | ||
.. Packages Python | ||
.. Standard code | ||
.. _PEP 8: https://www.python.org/dev/peps/pep-0008/ | ||
.. _PEP 257: https://www.python.org/dev/peps/pep-0257/ | ||
|
||
.. Tools Development | ||
.. _Pre Commit: https://github.com/observing/pre-commit | ||
.. _shellcheck: https://github.com/koalaman/shellcheck | ||
.. _pyenv: https://github.com/pyenv/pyenv | ||
.. _tmuxinator: https://github.com/tmuxinator/tmuxinator | ||
.. _Gherkin: https://github.com/cucumber/cucumber/wiki/Gherkin | ||
.. _Behave: http://pythonhosted.org/behave/ | ||
|
||
.. | ||
Servicios Cloud | ||
.. _Azure: https://azure.microsoft.com/en-us/ | ||
.. _Google Cloud Platform: https://cloud.google.com | ||
.. _AWS: https://aws.amazon.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Api | ||
*** | ||
|
||
|
||
`AWS Route53`_ | ||
============== | ||
|
||
AWS CloudFront | ||
============== | ||
|
||
AWS S3 | ||
====== | ||
|
||
AWS ELB Elastic Load Balancer (ELB) | ||
=================================== | ||
|
||
|
||
AWS SQS | ||
======= | ||
|
||
|
||
AWS DynamoDB | ||
============ | ||
|
||
|
||
.. include:: ../../_templates/links.rst | ||
|
||
|
||
.. rubric:: Footnotes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
WebHooks | ||
******** | ||
|
||
Aws ApiGateWay | ||
============== | ||
|
||
|
||
Aws Lambda | ||
========== | ||
|
||
|
||
.. include:: ../../_templates/links.rst | ||
|
||
|
||
.. rubric:: Footnotes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Componentes | ||
*********** | ||
|
||
.. toctree:: | ||
|
||
Api | ||
WebHooks | ||
|
||
.. include:: ../../_templates/links.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Consideraciones | ||
=============== | ||
|
||
|
||
.. include:: ../_templates/links.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
Despliegue | ||
********** | ||
|
||
El despliegue de los componentes se encuentra claramente definido en la | ||
siguiente imagen: | ||
|
||
|
||
.. uml:: | ||
|
||
left to right direction | ||
|
||
actor Admin | ||
node "Laptop" | ||
component "Terraform" | ||
component "ansible" | ||
artifact "Inventory" | ||
artifact "playbook" | ||
cloud AWS | ||
node Application | ||
node ActiveMQ | ||
node Other1 | ||
[Admin] --> [Laptop] | ||
[Laptop] --> [Terraform] | ||
[Terraform] --> [ansible] | ||
[ansible] <- [Inventory] | ||
[ansible] <- [playbook] | ||
[ansible] -- [AWS] | ||
[AWS] -- [Application] | ||
[AWS] -- [ActiveMQ] | ||
[AWS] -- [Other1] | ||
|
||
Pasos | ||
===== | ||
|
||
Orquestar servicios: | ||
-------------------- | ||
|
||
.. code-block:: bash | ||
λ terraform init | ||
λ make decrypt_vars env=stage | ||
λ terraform apply | ||
λ make encrypt_vars env=stage | ||
Orquestar Servidores: | ||
--------------------- | ||
|
||
.. code-block:: bash | ||
λ make ansible_provision env=stage | ||
λ make ansible_deploy env=stage | ||
Orquestar Servidores: | ||
--------------------- | ||
|
||
.. code-block:: bash | ||
λ make ansible_provision env=stage | ||
λ make ansible_deploy env=stage | ||
Desplegar Aplicacion | ||
-------------------- | ||
|
||
.. code-block:: bash | ||
λ make ansible_deploy_tags env=stage tags=deployment | ||
Admin | ||
===== | ||
|
||
|
||
Laptop | ||
====== | ||
|
||
Terraform | ||
========= | ||
|
||
Ansible | ||
======= | ||
|
||
Inventory | ||
--------- | ||
|
||
Playbook | ||
-------- | ||
|
||
|
||
.. rubric:: Notas | ||
|
||
.. include:: ../_templates/links.rst |
Oops, something went wrong.