Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
65 changes: 65 additions & 0 deletions kaui/1.9/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# How to use Kaui on DC/OS

Kaui is the administrative UI for [Kill Bill](https://killbill.io/), the open-source subscription billing and payments platform.

**Table of Contents**:

- [Prerequisites](#prerequisites)
- [Configure MySQL](#configure-mysql)
- [Install Kaui](#install-kaui)
- [Next steps](#next-steps)

## Prerequisites

- A running DC/OS 1.9 cluster with at least 1 node with 1 CPU and 2 GB of RAM available.
- [DC/OS CLI](https://dcos.io/docs/1.9/usage/cli/install/) installed.
- MySQL and Kill Bill installed.

## Configure MySQL

Setup the DDL (replace `a1.dcos` with the hostname returned by `dcos task mysql`):

```bash
echo "create database kaui" | mysql -h a1.dcos -u root -proot
curl -s https://raw.githubusercontent.com/killbill/killbill-admin-ui/master/db/ddl.sql | mysql -h a1.dcos -u root -proot kaui
echo "insert into kaui_allowed_users (kb_username, description, created_at, updated_at) values ('admin', 'super admin', NOW(), NOW());" | mysql -h a1.dcos -u root -proot kaui
echo "create user kaui identified by 'kaui' ; grant all privileges on kaui.* to 'kaui'@'%' ; flush privileges" | mysql -h a1.dcos -u root -proot
```

## Install Kaui

Create a file called `config.json` and set the following properties:

```json
{
"database": {
"host": "a1.dcos:3306",
"name": "kaui",
"user": "kaui",
"password": "kaui"
},
"killbill": {
"host": "http://marathon-lb-internal.marathon.mesos:10080"
}
}
```

Then, install Kaui:

```bash
dcos package install kaui --yes --options=config.json
```

You can follow the installation process via:

```bash
dcos task log kaui --follow
```

Verify the installation was successful by visiting http://m1.dcos/service/kaui/ (replace `m1.dcos` with the hostname of your Marathon instance). Note: you need to be logged-in in Marathon.

Additionally, verify the integration with Marathon-lb by going to http://a1.dcos:9090/haproxy?stats (replace `a1.dcos` with the hostname returned by `dcos task marathon-lb-internal`). You should see entries for `kaui_10090`. Running `curl http://a1.dcos:10090` a few times should update the HAProxy stats. Kaui is now available in the cluster behind `marathon-lb-internal.marathon.mesos:10090`.

## Next steps

Documentation and tutorials can be found at http://docs.killbill.io/.
3 changes: 3 additions & 0 deletions kaui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Select your DC/OS version:

[1.9](1.9)
105 changes: 105 additions & 0 deletions killbill/1.9/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# How to use Kill Bill on DC/OS

[Kill Bill](https://killbill.io/) is the open-source subscription billing and payments platform.

**Table of Contents**:

- [Prerequisites](#prerequisites)
- [Install MySQL](#install-mysql)
- [Install Kill Bill](#install-kill-bill)
- [Next steps](#next-steps)

## Prerequisites

- A running DC/OS 1.9 cluster with at least 1 node with 1 CPU and 2 GB of RAM available.
- [DC/OS CLI](https://dcos.io/docs/1.9/usage/cli/install/) installed.

## Install MySQL

Create a file called `config.json` and set the following properties:

```json
{
"service": {
"name": "mysql"
},
"database": {
"name": "killbill",
"username": "killbill",
"password": "killbill",
"root_password": "root"
},
"networking": {
"port": 3306,
"host_mode": true
}
}
```

Then, install MySQL:

```bash
dcos package install mysql --y --options=config.json
```

Finally, setup the DDL (replace `a1.dcos` with the hostname returned by `dcos task mysql`):

```bash
curl -s http://docs.killbill.io/0.18/ddl.sql | mysql -h a1.dcos -u root -proot killbill
```

## Install Marathon-LB

Create a file called `config.json` and set the following properties:

```json
{
"marathon-lb":{
"name":"marathon-lb-internal",
"haproxy-group":"internal",
"bind-http-https":false,
"role":""
}
}
```

Then, install Marathon-LB:

```bash
dcos package install marathon-lb --y --options=config.json
```

## Install Kill Bill

Create a file called `config.json` and set the following properties:

```json
{
"database": {
"host": "a1.dcos:3306",
"name": "killbill",
"user": "killbill",
"password": "killbill"
}
}
```

Then, install Kill Bill:

```bash
dcos package install killbill --yes --options=config.json
```

You can follow the installation process via:

```bash
dcos task log killbill --follow
```

Verify the installation was successful by visiting http://m1.dcos/service/killbill/1.0/healthcheck?pretty=true (replace `m1.dcos` with the hostname of your Marathon instance). Note: you need to be logged-in in Marathon.

Additionally, verify the integration with Marathon-lb by going to http://a1.dcos:9090/haproxy?stats (replace `a1.dcos` with the hostname returned by `dcos task marathon-lb-internal`). You should see entries for `killbill_10080`. Running `curl http://a1.dcos:10080/1.0/healthcheck` a few times should update the HAProxy stats. Kill Bill is now available in the cluster behind `marathon-lb-internal.marathon.mesos:10080`.

## Next steps

Documentation and tutorials can be found at http://docs.killbill.io/.
3 changes: 3 additions & 0 deletions killbill/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Select your DC/OS version:

[1.9](1.9)