Skip to content

Commit

Permalink
remove Docker support (until, or if ever, we convert to docker-compose)
Browse files Browse the repository at this point in the history
  • Loading branch information
erichanson committed Jan 29, 2019
1 parent aed7810 commit f810358
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 218 deletions.
31 changes: 0 additions & 31 deletions Dockerfile

This file was deleted.

114 changes: 9 additions & 105 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,123 +28,27 @@ Core Modules
Installation
------------

Aquameta can be installed either via Docker, on an Amazon Ubuntu 16.04 EC2 instance, or from source on your local machine.
Aquameta is designed for installation on a Ubuntu 18.04 instance. Aquameta installs a number of `apt` packages. It works best on a clean install of Ubuntu. We recommend using a KVM instance, or Amazon EC2 instance.

### Docker
1. `git clone https://github.com/aquametalabs/aquameta.git`
2. `cd aquameta`
3. `./install.sh`

To install via Docker, the easiest way is to just pull down the latest image from Docker Hub:
From the installer, follow the instructions.

```
docker pull aquametalabs/aquameta:0.2.0-rc2
```

Alternately, you can clone the Aquameta git repository and build your own Docker image (which takes about 15 minutes):

```
git clone https://github.com/aquametalabs/aquameta.git
cd aquameta/
docker build -t aquametalabs/aquameta .
```

Once you've either pulled or built a Aquameta image, run the container to start it up:

```
docker run -dit -p 80:80 -p 5432:5432 --privileged aquametalabs/aquameta:0.2.0-rc2
```

If you wish to use alternate ports, they can be changed in the `docker run` command.

```
# run the Aquameta webserver on port 8080, and the PostgreSQL server on port 5433
sudo docker run -dit -p 8080:80 -p 5433:5432 --privileged aquametalabs/aquameta:0.2.0-rc2
```

Make a note of the container-id that this command outputs. You can use it to
restart the container later, if you restart your computer, to get your data back.

Once Aquameta is running, browse to `http://localhost/dev` (or whatever
host/port it is installed on) to access the web-based IDE. To access the
PostgreSQL database, use `psql -p 5432 aquameta`.

Aquameta uses the "long-running container" pattern instead of exporting volumes
at this time, so if you stop the container, just restart it with `docker
restart {container_id}`.


### Amazon EC2

To install Amazon on Amazon, follow these steps:

1. Create a new EC2 instance, running Ubuntu 16.04
2. ssh into your instance with `ssh -i {your_pem_file.pem} ubuntu@{your_ip}`
3. `git clone https://github.com/aquametalabs/aquameta.git`
4. `sudo mkdir /s`
5. `mv ./aquameta /s/aquameta`
6. `cd /s/aquameta`
7. `./install.sh`

From the installer, follow the instructions. If prompted for any LOCALE settings, just hit OK.

Once the installer completes, you'll have a instance of Aquameta running.

### From Source (Advanced)

To install Aquameta from source, follow the steps in the
[install.sh](https://github.com/aquametalabs/aquameta/blob/master/install.sh)
script. The script is designed to run on an Ubuntu 16.04 server, and will
require some adaptation for different environments.

Getting Started
---------------

Once you have Aquameta running, create a superuser and then you can start building applications.

### Create a Superuser

To setup a user, from a shell prompt, open up a database shell with:

```
$ psql aquameta
psql (9.6.9)
Type "help" for help.
aquameta=# select endpoint.register('[email protected]');
```

You'll be sent a confirmation code to the email specified. Check your email and copy the code. CHECK YOUR SPAM FOLDER!

Then confirm the user registration and make the user a PostgreSQL superuser:

```
aquameta=# select endpoint.register_confirm('[email protected]', '{your confirmation code}');
aquameta=# select endpoint.superuser('[email protected]');
```

You now have a superuser. Browse to http://{your_ip}/login to sign in.

### Starting Development

The primary development interface lives at http://{your_ip}/dev. From here you can create bundles and edit their contents. To find out more about how to develop apps in Aquameta, here are the available resources:

- [Quickstart](docs/quickstart.md)
- [Cheat Sheet](docs/cheatsheet.md)

Development
-----------

The primary development interface lives at http://{your_ip}/dev. From here you can create bundles and edit their contents. For more information, see the [documentation](docs/).

Contribute
----------

- Source Code: [github.com/aquametalabs/aquameta](https://github.com/aquametalabs/aquameta)
- Issue Tracker: [github.com/aquametalabs/aquameta/issues](https://github.com/aquametalabs/aquameta/issues)
- IRC Channel: `#aquameta` on `irc.freenode.net`

Support
-------

If you are having issues, please let us know.
We have a mailing list located at: [email protected]

License
-------

The project is licensed under the GPL.
The project is licensed under the GPL 3.0.
34 changes: 0 additions & 34 deletions docker/supervisord.conf

This file was deleted.

38 changes: 6 additions & 32 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

This document guides you through the minimal steps to get started with Aquameta. It contains the following steps:

- install Aquameta via Docker
- create a new bundle
- create a base HTML resource that imports the bundle and calls a widget
- create a simple widget
Expand All @@ -11,36 +10,11 @@ This document guides you through the minimal steps to get started with Aquameta.
- commit the changes to the bundle


## 1. Install with Docker

If you don't have Docker installed, [install it](https://docs.docker.com/engine/installation/). Then:

```bash
$ docker pull aquametalabs/aquameta:0.2.0-rc2

# run on standard ports
$ docker run -dit -p 80:80 -p 5432:5432 aquametalabs/aquameta:0.2.0-rc2

# run on alternate ports: Webserver on port 8080, PostgreSQL on port 5433
$ docker run -dit -p 8080:80 -p 5433:5432 aquametalabs/aquameta:0.2.0-rc2
1c59e82ed50ff4463af35d2cc5435c3086f4d67f0046365b4df505dc91e95d19
```

Your Aquameta instance is now installed. The `docker run` command prints a container-id, which you should take save for running future commands against in the running docker container. For example, to get a bash shell in the container, run:

```bash
$ docker exec -it 1c59e82ed50ff4463af35d2cc5435c3086f4d67f0046365b4df505dc91e95d19 bash
root@0f84133a577e:/s/aquameta#
```

Now that you have a running container, you can access the IDE by browsing to whatever hostname and port you installed it on, at `http://{hostname}:{port}/dev`, for example:

http://localhost:80/dev

## 2. Create a Bundle
## 1. Create a Bundle
From the `/dev` interface, click "new bundle" and give it a name. Use [Reverse domain name notation](https://en.wikipedia.org/wiki/Reverse_domain_name_notation) to give your bundle a unique name, like `org.flyingmonkeys.myproject`.

## 3. Create a Base Page
## 2. Create a Base Page
Applications have a base HTML page, a static resource that bootstraps the app. To create the page, click 'new row', then choose 'Resource', and give the resource a path that starts with a /, like `/myproj`.

Here is the minimal base page template:
Expand Down Expand Up @@ -80,7 +54,7 @@ Here is the minimal base page template:
```
Paste this into the code section of the resource, customize the variables, and hit save (or CTRL-S).

## 4. Create a Main Widget
## 3. Create a Main Widget
In our base HTML page, we added to the page the `'myproj:main'` widget. We need to make that widget.

Click "New Row" and then "Widget", enter "main" for the name. This will bring up a widget editor. Under the HTML tab, set the HTML to:
Expand All @@ -91,13 +65,13 @@ Click "New Row" and then "Widget", enter "main" for the name. This will bring u
</div>
```

## 5. View Your App
## 4. View Your App
Browse to the page that you created, whatever path you supplied for the Base Page, and you should see your Hello World widget.

## 6. Open the Debugger
## 5. Open the Debugger
In the bottom right of your app, you should see the debugger. Check the checkbox, to bring up the list of widgets on the screen. Click into any widget to edit it.

## 7. Commit Changes
## 6. Commit Changes
From the `/dev` interface, click the "commit" button, which brings up a list of staged and unstaged changes. Click "stage" for each row to stage for the next commit. Click "commit" to commit the changes, and supply a commit summary.

## Conclusion
Expand Down
26 changes: 10 additions & 16 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@ echo " NOT be run in a production environment."
echo " You have been warned."
echo " ❤ MGMT."

if [ "$1" != "--silent" ]
read -p "Continue? [y/N]" -n 1 -r
echo # (optional) move to a new line
if ! [[ $REPLY =~ ^[Yy]$ ]]
then
read -p "Continue? [y/N]" -n 1 -r
echo # (optional) move to a new line
if ! [[ $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
exit 1
fi

# set working directory and destination directory
Expand Down Expand Up @@ -241,8 +238,8 @@ sudo -u postgres psql -c "$REG_SUPERUSER_COMMAND" aquameta
echo "New User Registration Scheme"
echo "----------------------------"
echo "Please select a security scheme:"
echo "a) CLOSED REGISTRATION - No public registration, users must be manually created."
echo "b) OPEN REGISTRATION - Pubic users may register for an account"
echo "a) PRIVATE - No anonymous access, no anonymous user registration"
echo "b) OPEN REGISTRATION - Anonymous users may register for an account and read limited data"

until [[ $REPLY =~ ^[AaBb]$ ]]; do
read -p "Choice? [a/B] " -n 1 -r
Expand All @@ -251,14 +248,11 @@ done

sudo -u postgres psql -f $SRC/src/privileges/000-general.sql aquameta

if [[ $REPLY =~ ^[Aa]$ ]];
then
echo "Installing CLOSED registration scheme..."
if [[ $REPLY =~ ^[Aa]$ ]]; then
echo "Installing PRIVATE security scheme..."
sudo -u postgres psql -f $SRC/src/privileges/001-anonymous.sql aquameta
else
if [[ $REPLY =~ ^[Bb]$ ]];
then
echo "Installing OPEN registration scheme..."
else if [[ $REPLY =~ ^[Bb]$ ]]; then
echo "Installing OPEN REGISTRATION scheme..."
sudo -u postgres psql -f $SRC/src/privileges/001-anonymous-register.sql aquameta
fi
fi
Expand Down

0 comments on commit f810358

Please sign in to comment.