Skip to content

Commit

Permalink
Merge pull request #1 from barbu-it/develop
Browse files Browse the repository at this point in the history
Prepare v0.1.2
  • Loading branch information
mrjk committed Feb 16, 2023
2 parents 18be87e + f2f756d commit 9061544
Show file tree
Hide file tree
Showing 38 changed files with 5,177 additions and 154 deletions.
62 changes: 22 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Please :star: this project if like it of if you want to support it!
</p>

<p align='center'>
Official documentation is available on [https://barbu-it.github.io/paasify/]
Official documentation is available on <a href="https://barbu-it.github.io/paasify/">https://barbu-it.github.io/paasify/</a>.
</p>

-------
Expand Down Expand Up @@ -70,7 +70,7 @@ This project try to overstep the missing gap between the docker-compose deployme
* [Quickstart](#quickstart)
+ [Installation with pip](#installation-with-pip)
+ [Installation with docker](#installation-with-docker)
+ [Usage/Examples](#usage-examples)
+ [Example project: Wordpress](#example-project:-wordpress)
+ [Demo](#demo)
* [Overview](#overview)
+ [Features](#features)
Expand All @@ -91,68 +91,50 @@ This project try to overstep the missing gap between the docker-compose deployme
There are different ways to install Paasify:

* [Installation with pip](#installation-with-pip): This is the recommended installation method for people who wants to try and/or develop infrastructure.
* [Installation with docker](#installation-with-docker): Docker installation is more recommended for production environment.
* [Installation with docker](#installation-with-docker): Docker installation is more recommended for production environment. (WIP)
* [Installation with git](https://barbu-it.github.io/paasify/develop/install/): If you want to improve or contribute to Paasify itself.


### Installation with pip

Install Paasify with pip:
Install Paasify with pip. You may eventually install paasify in its own
Python VirtualEnv, please adapt your commands, but for most people:

```bash
pip install paasify
paasify --help
```

### Installation with docker

The idea is to create a simple alias that will call the paasify image:

```bash
alias paasify='docker run --rm -w /work -v $PWD:/work -ti ghcr.io/barbu-it/paasify:latest paasify '

You can check paasify is correctly installed by running the command:
```
paasify --help
```


### Usage/Examples
### Example project: Wordpress

You need to have docker daemon running. See requirements section for further details. Let's try to deploy a Hello World project with paasify. It consists in deploying a proxy, for managing incoming traffic (we uses Traefik here) and a simple page that will list all the services you deployed with paasify.
You need to have git and a running docker daemon. See requirements section for further
details.

```bash
paasify new devbox
cat <<EOF
# My new project
sources:
- name: community
remote: https://github.com/barbu-it/paasify-collection-community
config:
vars:
app_expose_ip: 127.0.0.1
app_domain: ${app_expose_ip}.nip.io
tag_prefix:
- homepage
- traefik-svc
stack:
- app: traefik
- app: homepage
- app: community:wordpress
tags:
- phpmyadmin
EOF
Let's try to deploy a simple Wordpress instance with Paasify. It consists in deploying
a proxy, for managing incoming traffic (we uses Traefik here), a dashboard and
the Worpress instance. To deploy a such project:

```bash
git clone https://github.com/barbu-it/paasify-example-wordpress.git wordpress
cd wordpress
paasify src install
paasify apply
```

Then you can visit: [http://homepage.127.0.0.1.nip.io](http://homepage.127.0.0.1.nip.io). Of course you can manage your own domains and manage SSL with let's encrypt. To have an idea of what app you can install, please checkout official collections:
Then you can visit: [http://home.localhost](). Of course you can manage your own domains and manage SSL
with let's encrypt. You can virtually add and tweak other applications. To have an idea of what app
you can install, please checkout official collections:

* [barbu-it/paasify-collection-community](https://github.com/barbu-it/paasify-collection-community): Apps provided for and by the community
* [barbu-it/paasify-collection-infra](https://github.com/barbu-it/paasify-collection-infra): Dev et devops oriented Apps

You can also find community collections in github, with the [#paasify-collection](https://github.com/barbu-it/paasify-example-wordpress/search?q=%23paasify-collection) tag.


## :sparkles: Overview

Expand Down
80 changes: 46 additions & 34 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,78 @@


--8<-- "../README.md::46"
--8<-- "../README.md::48"


<p align='center'>
<img src="static/overview.svg" alt="Overview">
</p>


--8<-- "../README.md:85:111"
--8<-- "../README.md:88:138"


### Configuration


Below a ten thousand foot overview, this will deploy a wordpress with its database and a front proxy.

## Simple example project

There is a simple config file that illustrate all componants:
There is a simple config file that illustrate all componants, taken from the previous [wordpress example project](https://github.com/barbu-it/paasify-example-wordpress):
``` yaml title="paasify.yml"
source:
default:
url: http://gthub.com/mrjk/...git
internal:
url: http://internal.org/mrjk/...git
sources:
- name: community
remote: https://github.com/barbu-it/paasify-collection-community

config:
vars:
app_domain: domain.com
namespace: demo-wp
extra_vars:
- secrets.yml
vars:
# We expose to 127.0.0.1, under the *.locahost domain
app_expose_ip: 127.0.0.1
app_domain: localhost

# Other domain examples
#app_domain: mydomain.org
#app_domain: localtest.me
#app_domain: ${app_expose_ip}.nip.io

# Default traefik network
traefik_net_name: ${_prj_ns}_proxy_default
tags_prefix:
- homepage
- traefik-svc

stacks:
- name: traefik
- app: proxy
vars:
app_fqdn: front.domain-admin.com
- name: wordpress
tags:
mysql-sidecar
- name: hello
source: internal
traefik_net_external: False
tags:
mysql-sidecar
- expose_http
- expose_admin
- app: home
- app: community:wordpress
```
A `source` is a list of git repo collections. The config contains all settings that will
apply to the project and its stacks. The `stacks` key is a list of sequential stack to be applied.
The first config element is `sources`, which is a list of git repo collections. The config contains
all settings that will apply to the project and its stacks. The `stacks` key is a list of sequential stack to be applied.
Each stack is configurable and allow a fine grained configuration override dependings the user needs.
To each stack can be applied vars and/or a list of tags.
To each stack can be applied vars and/or a list of tags. Finally the `config` key allow to put project
and default stack configuration.

Then, you just have to run the following to set all up and running:

``` console
paasify apply
```

You should be able to access to a fresh Wordpress example on localhost.
You should be able to access to a fresh Wordpress instance on [http://wordpress.localhost]() url while your
project dashboard should be accessible on [http://home.localhost]().


## Where to start

## What next?

Please start with one of:

* [Tutorial](jupyter/learn_101)
* [Concepts](docs/concepts)
* [Usage](docs/usage)
* [Plugins](plugins_apidoc/)
* [Reference](refs/)
* [Tutorial](jupyter/learn_101): More examples with some uses cases
* [Concepts](docs/concepts): To understand Paasify core concepts
* [Usage](docs/usage): To see how to use Paasify
* [Plugins](plugins_apidoc/): Get collection reference
* [Reference](refs/): Get reference and config schemas

Binary file modified logo/favicon.ico
Binary file not shown.
Loading

0 comments on commit 9061544

Please sign in to comment.