Git Product home page Git Product logo

puffin's Introduction

Puffin

Build Status

NOTE: The project is not maintained anymore, the code is here for historical / fork purposes.

Introduction

The goal of the project is to allow average, tech-oriented user to run web applications with ease. The idea is to create an easy to host, technology agnostic private cloud. The ultimate aim is to achieve greater decentralization of web services, such as social networks, file sharing, blog or email.

While many other tools are looking at containers as a way to run massive applications, Puffin concentrates on lightweight ones, each serving just a handful of people.

You can chose to host the applications on Puffin managed platform or on your own server.

Demo

Live demo platform is available at puffin.rocks

Puffin Front Page

Architecture

Puffin consists of two main components - application catalog and interface that provides means to run the applications. Any of them can be used independently - you can run the applications from the catalog directly, and you can use the interface to run your own applications that are not present in the catalog.

Technology

Puffin is based on Docker containers and for orchestration is uses Docker Compose.

Software is written in Python 3, using Flask web microframework. PosttgreSQL database is used to store the data. Nginx is used as a reverse proxy.

Deployment

Local deployment

Set-up DNS

To access installed applications from localhost you need to set-up local DNS. There are many alternative solutions to this problem, the simplest one is to add the following lines at the top of your /etc/resolv.conf file:

nameserver 127.0.0.1
options ndots:0

Which can be done by executing the following command as root:

echo -e "nameserver 127.0.0.1\noptions ndots:0\n$(cat /etc/resolv.conf)" > /etc/resolv.conf

Make sure that you disable your other local DNS server, such as dnsmasq, before running Puffin.

Clone git repository

Puffin application catalog is stored as git submodules. When cloning the repo make sure to use --recursive option:

git clone --recursive [email protected]:puffinrocks/puffin.git

Or if you have already cloned the repo then update the submodules in it:

git submodule update --init --recursive

Run Puffin

Clone the repository and use Docker Compose:

docker-compose up

Go to http://puffin.localhost to access Puffin. Log In as user "puffin", password "puffin". Emails sent from Puffin are accessible via embedded Mailhog server at http://mailhog.localhost.

If http://puffin.localhost is not accessible you can try connecting to Puffin via a port: http://localhost:8080. However, without DNS configured correctly, you won't be able to access the apps.

Puffin server is automatically reloaded on every code change thanks to reload. To rebuild the code after making more substantial change, such as modifying dependencies, run:

docker-compose build

Puffin contains several convenience commands to upgrade the database, manage users, execute internal shell, etc. To get a complete list, run:

docker-compose run puffin --help

Production deployment

Configuration

To deploy Puffin for private needs, for a single user or a limited number of users, use docker-compose-example.yml file as a basis:

cp docker-compose-example.yml docker-compose-production.yml

You need to change SERVER_NAME and VIRTUAL_HOST variables to point to your domain. You also need to set SECRET_KEY variable to a random value.

For a full list of configuration options see puffin/core/config.py.

Email

To send emails from Puffin and the applications you need to configure few environment variables before starting Puffin. It's probably easiest to register to an external email service to avoid being classified as spammer. The variables are (not all are obligatory, see puffin/core/config.py for more details):

MAIL_SERVER
MAIL_PORT
MAIL_USE_TLS
MAIL_USE_SSL
MAIL_USERNAME
MAIL_PASSWORD
MAIL_DEFAULT_SENDER
MAIL_SUPPRESS_SEND

Set-up DNS

On public server you need to configure wildacard DNS record to point to your root domain and all its subdomains.

Docker Machine

If you would like to deploy Puffin on a remote server, Docker Machine comes in handy. You can easily install Docker in the cloud or on your own server.

To instruct Docker to interact with remote server run:

eval "$(docker-machine env [machine-name])"

Run Puffin

Finally you can run Puffin:

docker-compose -f docker-compose-production.yml up -d

Configure users

Initially only "puffin" user with "puffin" password will be created - make sure to change the password before exposing puffin to the outside world. Later you can either allow other users to register themselves on your platform (via SECURITY_REGISTERABLE=True config setting) or create them manually:

docker-compose run puffin user create [login]

(The password will be the same as login, so it should be changed as soon as possible.)

Clustering

Clustering is currently not supported, but you may run apps on a separate machine than Puffin server itself. To achieve that take a look on MACHINE_* options. You also won't need network sections in your docker-compose file, since the networks will be created automatically on the remote machine.

Application Update & Backup

Application versions are regularly updated. In order to assure than new version doesn't corrupt the data, an automatic backup of all volumes is performed on every application restart.

Contributing

See CONTRIBUTING.md.

Changelog

See CHANGELOG.md.

License

AGPL, see LICENSE.txt for details.

puffin's People

Contributors

jdipierro avatar loomchild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puffin's Issues

CSRF token missing

Hello,

I have installed the latest puffin and when I try to register or login I get the following error:
CSRF token missing

Could it be to do with using my server IP address for the env variables SERVER_NAME & VIRTUAL_HOST?

Any other ideas why?

Internal server error when trying to run application

Hi Jarek,

I am trying to run my own app. I am getting the following error in the broswer when I select the app from the catalogue:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

When I get the logs of the puffin container the error is:

ERROR [puffin] Exception on /application/3d-repo.html [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/src/app/puffin/gui/view.py", line 59, in application
application_image_version = docker.get_application_image_version(client, application)
File "/usr/src/app/puffin/core/docker.py", line 129, in get_application_image_version
image = client.images.get(image_name)
File "/usr/local/lib/python3.6/site-packages/docker/models/images.py", line 190, in get
return self.prepare_model(self.client.api.inspect_image(name))
File "/usr/local/lib/python3.6/site-packages/docker/utils/decorators.py", line 19, in wrapped
'Resource ID was not provided'
docker.errors.NullResource: Resource ID was not provided

After I upload my app, I build the docker-compose image in the puffin apps/ directory. I also rebuilding puffin before I click the app.

Any ideas what could be the reason for this error?

Thanks

docker-compose doesn't work

Hi there,

just wanted to play with puffin a bit. Turns out I can't even get it up and running.

docker-compose up produces

Creating network "puffin_back" with the default driver
Creating network "puffin_front" with the default driver
Creating network "puffin_default" with the default driver
Creating puffin_puffindb_1
Creating puffin_dns_1
Creating puffin_mailhog_1
Creating puffin_puffin_1
Creating puffin_dnsfix_1
Attaching to puffin_puffindb_1, puffin_dns_1, puffin_mailhog_1, puffin_puffin_1, puffin_dnsfix_1
puffindb_1  | The files belonging to this database system will be owned by user "postgres".
puffindb_1  | This user must also own the server process.
puffindb_1  | 
mailhog_1   | 2017/01/11 10:32:03 Using in-memory storage
mailhog_1   | 2017/01/11 10:32:03 [SMTP] Binding to address: 0.0.0.0:1025
puffindb_1  | The database cluster will be initialized with locale "en_US.utf8".
puffindb_1  | The default database encoding has accordingly been set to "UTF8".
puffindb_1  | The default text search configuration will be set to "english".
puffindb_1  | 
puffindb_1  | Data page checksums are disabled.
puffindb_1  | 
puffindb_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
mailhog_1   | 2017/01/11 10:32:03 Serving under http://0.0.0.0:8025/
mailhog_1   | [HTTP] Binding to address: 0.0.0.0:8025
mailhog_1   | Creating API v1 with WebPath: 
puffindb_1  | creating subdirectories ... ok
mailhog_1   | Creating API v2 with WebPath: 
puffindb_1  | selecting default max_connections ... 100
puffindb_1  | selecting default shared_buffers ... 128MB
puffindb_1  | selecting dynamic shared memory implementation ... posix
puffindb_1  | creating configuration files ... ok
puffindb_1  | running bootstrap script ... ok
puffindb_1  | performing post-bootstrap initialization ... ok
puffindb_1  | syncing data to disk ... ok
puffindb_1  | 
puffindb_1  | Success. You can now start the database server using:
puffindb_1  | 
puffindb_1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
puffindb_1  | 
puffindb_1  | 
puffindb_1  | WARNING: enabling "trust" authentication for local connections
puffindb_1  | You can change this by editing pg_hba.conf or using the option -A, or
puffindb_1  | --auth-local and --auth-host, the next time you run initdb.
puffindb_1  | ****************************************************
puffindb_1  | WARNING: No password has been set for the database.
puffindb_1  |          This will allow anyone with access to the
puffindb_1  |          Postgres port to access your database. In
puffindb_1  |          Docker's default configuration, this is
puffindb_1  |          effectively any other container on the same
puffindb_1  |          system.
puffindb_1  | 
puffindb_1  |          Use "-e POSTGRES_PASSWORD=password" to set
puffindb_1  |          it in "docker run".
puffindb_1  | ****************************************************
puffindb_1  | waiting for server to start....LOG:  database system was shut down at 2017-01-11 10:32:05 UTC
puffindb_1  | LOG:  MultiXact member wraparound protections are now enabled
puffindb_1  | LOG:  database system is ready to accept connections
puffindb_1  | LOG:  autovacuum launcher started
puffindb_1  |  done
puffindb_1  | server started
puffindb_1  | ALTER ROLE
puffindb_1  | 
puffindb_1  | 
puffindb_1  | /docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
puffindb_1  | 
puffindb_1  | LOG:  received fast shutdown request
puffindb_1  | LOG:  aborting any active transactions
puffindb_1  | LOG:  autovacuum launcher shutting down
puffindb_1  | LOG:  shutting down
puffindb_1  | waiting for server to shut down....LOG:  database system is shut down
puffindb_1  |  done
puffindb_1  | server stopped
puffindb_1  | 
puffindb_1  | PostgreSQL init process complete; ready for start up.
puffindb_1  | 
puffindb_1  | LOG:  database system was shut down at 2017-01-11 10:32:07 UTC
puffindb_1  | LOG:  MultiXact member wraparound protections are now enabled
puffindb_1  | LOG:  autovacuum launcher started
puffindb_1  | LOG:  database system is ready to accept connections
puffin_dnsfix_1 exited with code 0
puffindb_1  | WARNING:  there is no transaction in progress
puffin_1    | Created puffin database
puffindb_1  | WARNING:  there is no transaction in progress
puffin_1    | Created puffin_test database
puffin_1    | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
puffin_1    | INFO  [alembic.runtime.migration] Will assume transactional DDL.
puffin_1    | INFO  [alembic.runtime.migration] Running upgrade  -> 16709bf9085, empty message
puffin_1    | INFO  [alembic.runtime.migration] Running upgrade 16709bf9085 -> 400aaaf88e5, empty message
puffin_1    | INFO  [alembic.runtime.migration] Running upgrade 400aaaf88e5 -> 813ee19614, empty message
puffin_1    | INFO  [alembic.runtime.migration] Running upgrade 813ee19614 -> 16d40b17caf, empty message
puffin_1    | INFO  [alembic.runtime.migration] Running upgrade 16d40b17caf -> 4ccccdd6b0, empty message
puffin_1    | INFO  [alembic.runtime.migration] Running upgrade 4ccccdd6b0 -> 365f1188e96, empty message
puffin_1    | INFO  [alembic.runtime.migration] Running upgrade 365f1188e96 -> 31850461ed3, empty message
puffin_1    | Traceback (most recent call last):
puffin_1    |   File "puffin.py", line 196, in <module>
puffin_1    |     manager.run()
puffin_1    |   File "/usr/local/lib/python3.6/site-packages/flask_script/__init__.py", line 412, in run
puffin_1    |     result = self.handle(sys.argv[0], sys.argv[1:])
puffin_1    |   File "/usr/local/lib/python3.6/site-packages/flask_script/__init__.py", line 383, in handle
puffin_1    |     res = handle(*args, **config)
puffin_1    |   File "/usr/local/lib/python3.6/site-packages/flask_script/commands.py", line 216, in __call__
puffin_1    |     return self.run(*args, **kwargs)
puffin_1    |   File "puffin.py", line 190, in up
puffin_1    |     init()
puffin_1    |   File "puffin.py", line 181, in init
puffin_1    |     machine_proxy()
puffin_1    |   File "puffin.py", line 73, in machine_proxy
puffin_1    |     if docker.install_proxy():
puffin_1    |   File "/usr/src/app/puffin/core/docker.py", line 146, in install_proxy
puffin_1    |     return _install("_proxy")
puffin_1    |   File "/usr/src/app/puffin/core/docker.py", line 164, in _install
puffin_1    |     application = get_application(name)
puffin_1    |   File "/usr/src/app/puffin/core/applications.py", line 70, in get_application
puffin_1    |     return applications[application_id]
puffin_1    | KeyError: '_proxy'
puffin_puffin_1 exited with code 1

Firefox and Piwik Time Zone Issue

Piwik does not show the timezone select menu in Firefox. The issue itself is not directly related to puffin itself. The issue is a problem in the Piwik code base see here: matomo-org/matomo#11310
However, I just wanted to make other users aware of the problem. As a work around use another browser during the Piwik setup process.

Replacing Puffin front end

Hi Jarek,

I am currently trying to replace the front end of Puffin so that the frontend and backend are decoupled. The first task that I have set myself is that a user must login prior to accessing the catalogue.

I have made a basic login page and I am using Ajax to send requests to the server. However, I am running into some issues with Cross Origin Resource Sharing (CORS). From research, I suspect that because my login page is not submitting a compatible CSRF token to the server, thus, the server is rejecting my Ajax request to login with "CSRF token missing" (See this stackoverflow answer for reasons that this happens).

I have tried reading the CSRF token from browser API using var csrftoken = Cookies.get('csrftoken') and then submitting it as a part of the header request to the server $.ajax { ... headers:{"HTTP_X_CSRF_TOKEN":csrftoken}, ... }

I assume that the CSRF need to match and are generated as a part of the templates in puffin and forwarded as a header in the HTML in the puffin frontend? Do you have any suggestions to get around this?

Thank you!

Error starting userland proxy: listen udp 0.0.0.0:53: bind: address already in use

Failed the same way on all three of my systems, all of which running the following:

DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18.1
DISTRIB_CODENAME=serena
DISTRIB_DESCRIPTION="Linux Mint 18.1 Serena"

m@m-LT:~/puffin|master⚡ ⇒  sudo docker-compose up
Creating network "puffin_front" with the default driver
Creating network "puffin_default" with the default driver
Creating network "puffin_back" with the default driver
Pulling mailhog (mailhog/mailhog:latest)...
latest: Pulling from mailhog/mailhog
709515475419: Pull complete
6f91489e9e5b: Pull complete
6500075800d5: Pull complete
c3d9e42bac5e: Pull complete
Digest: sha256:5be1ae7cf894b58fffbe48f84a0541a3595e53124d460d3fb71b3450a8d11189
Status: Downloaded newer image for mailhog/mailhog:latest
Pulling puffindb (postgres:latest)...
latest: Pulling from library/postgres
723254a2c089: Pull complete
39ec0e6c372c: Pull complete
ba1542fb91f3: Pull complete
c7195e642388: Pull complete
95424deca6a2: Pull complete
2d7d4b3a4ce2: Pull complete
fbde41d4a8cc: Pull complete
880120b92add: Pull complete
9a217c784089: Pull complete
d581543fe8e7: Pull complete
e5eff8940bb0: Pull complete
462d60a56b09: Pull complete
135fa6b9c139: Pull complete
Digest: sha256:3f4441460029e12905a5d447a3549ae2ac13323d045391b0cb0cf8b48ea17463
Status: Downloaded newer image for postgres:latest
Pulling dns (puffinrocks/dns:latest)...
latest: Pulling from puffinrocks/dns
efd26ecc9548: Pull complete
a3ed95caeb02: Pull complete
958137400430: Pull complete
d9d7f25de30c: Pull complete
629c4213bc65: Pull complete
Digest: sha256:db3297c02450b693444fb3018926ef0b62892ce78c4b3ee2293fd9624960e664
Status: Downloaded newer image for puffinrocks/dns:latest
Building puffin
Step 1/4 : FROM python:3-onbuild
3-onbuild: Pulling from library/python
f49cf87b52c1: Already exists
7b491c575b06: Pull complete
b313b08bab3b: Pull complete
51d6678c3f0e: Pull complete
09f35bd58db2: Pull complete
0f9de702e222: Pull complete
73911d37fcde: Pull complete
99a87e214c92: Pull complete
636f90eed4e0: Pull complete
Digest: sha256:27324e075cd19d9a3f5e9182b232e64ad3c3dad4593c25f746296108c6bedc69
Status: Downloaded newer image for python:3-onbuild
# Executing 3 build triggers
 ---> Running in dc170b7afcbb
Collecting Flask<0.11,>=0.10 (from -r requirements.txt (line 1))
  Downloading Flask-0.10.1.tar.gz (544kB)
Collecting Flask-SQLAlchemy<3.0,>=2.0 (from -r requirements.txt (line 2))
  Downloading Flask_SQLAlchemy-2.3.2-py2.py3-none-any.whl
Collecting Flask-Migrate<1.7,>=1.6 (from -r requirements.txt (line 3))
  Downloading Flask-Migrate-1.6.0.tar.gz
Collecting Flask-Security==1.7.4 (from -r requirements.txt (line 4))
  Downloading Flask-Security-1.7.4.tar.gz (41kB)
Collecting Flask-Login==0.2.11 (from -r requirements.txt (line 5))
  Downloading Flask-Login-0.2.11.tar.gz
Collecting Flask-WTF<0.13,>=0.12 (from -r requirements.txt (line 6))
  Downloading Flask-WTF-0.12.tar.gz (247kB)
Collecting Flask-Bootstrap<3.4,>=3.3 (from -r requirements.txt (line 7))
  Downloading Flask-Bootstrap-3.3.7.1.tar.gz (456kB)
Collecting Flask-Script<2.1,>=2.0 (from -r requirements.txt (line 8))
  Downloading Flask-Script-2.0.6.tar.gz (43kB)
Collecting Flask-Mail<0.10,>=0.9 (from -r requirements.txt (line 9))
  Downloading Flask-Mail-0.9.1.tar.gz (45kB)
Collecting Flask-Markdown<0.4,>=0.3 (from -r requirements.txt (line 10))
  Downloading Flask-Markdown-0.3.tar.gz (165kB)
Collecting Flask-Bleach<0.1,>=0.0.2 (from -r requirements.txt (line 11))
  Downloading Flask-Bleach-0.0.2.tar.gz
Collecting Flask-Analytics<0.6,>=0.5 (from -r requirements.txt (line 12))
  Downloading Flask_Analytics-0.5.5-py3-none-any.whl
Collecting waitress<0.9,>=0.8 (from -r requirements.txt (line 13))
  Downloading waitress-0.8.10.tar.gz (123kB)
Collecting psycopg2<2.7,>=2.6 (from -r requirements.txt (line 14))
  Downloading psycopg2-2.6.2.tar.gz (376kB)
Collecting bcrypt<2.1,>=2.0 (from -r requirements.txt (line 15))
  Downloading bcrypt-2.0.0.tar.gz
Collecting cachetools<1.2,>=1.1 (from -r requirements.txt (line 16))
  Downloading cachetools-1.1.6-py2.py3-none-any.whl
Collecting PyYAML<3.12,>=3.11 (from -r requirements.txt (line 17))
  Downloading PyYAML-3.11.zip (371kB)
Collecting docker<2.3,>=2.2.1 (from -r requirements.txt (line 18))
  Downloading docker-2.2.1-py2.py3-none-any.whl (107kB)
Collecting docker-compose<1.13,>=1.12 (from -r requirements.txt (line 19))
  Downloading docker_compose-1.12.0-py2.py3-none-any.whl (91kB)
Collecting requests<2.8,>=2.7 (from -r requirements.txt (line 20))
  Downloading requests-2.7.0-py2.py3-none-any.whl (470kB)
Collecting dumb-init<1.1,>=1.0 (from -r requirements.txt (line 21))
  Downloading dumb-init-1.0.3.tar.gz
Collecting bleach<2.0,>=1.5 (from -r requirements.txt (line 22))
  Downloading bleach-1.5.0-py2.py3-none-any.whl
Collecting pytest<3.0,>=2.8 (from -r requirements.txt (line 24))
  Downloading pytest-2.9.2-py2.py3-none-any.whl (162kB)
Collecting pytest-cov<3.0,>=2.2 (from -r requirements.txt (line 25))
  Downloading pytest_cov-2.5.1-py2.py3-none-any.whl
Collecting ipython<7.0,>=6.0 (from -r requirements.txt (line 26))
  Downloading ipython-6.2.1-py3-none-any.whl (745kB)
Collecting reload<1.0,>=0.9 (from -r requirements.txt (line 27))
  Downloading reload-0.9.tar.gz
Collecting Werkzeug>=0.7 (from Flask<0.11,>=0.10->-r requirements.txt (line 1))
  Downloading Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
Collecting Jinja2>=2.4 (from Flask<0.11,>=0.10->-r requirements.txt (line 1))
  Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)
Collecting itsdangerous>=0.21 (from Flask<0.11,>=0.10->-r requirements.txt (line 1))
  Downloading itsdangerous-0.24.tar.gz (46kB)
Collecting SQLAlchemy>=0.8.0 (from Flask-SQLAlchemy<3.0,>=2.0->-r requirements.txt (line 2))
  Downloading SQLAlchemy-1.2.0.tar.gz (5.5MB)
Collecting alembic>=0.6 (from Flask-Migrate<1.7,>=1.6->-r requirements.txt (line 3))
  Downloading alembic-0.9.6.tar.gz (998kB)
Collecting Flask-Principal>=0.3.3 (from Flask-Security==1.7.4->-r requirements.txt (line 4))
  Downloading Flask-Principal-0.4.0.tar.gz
Collecting passlib>=1.6.1 (from Flask-Security==1.7.4->-r requirements.txt (line 4))
  Downloading passlib-1.7.1-py2.py3-none-any.whl (498kB)
Collecting WTForms (from Flask-WTF<0.13,>=0.12->-r requirements.txt (line 6))
  Downloading WTForms-2.1.zip (553kB)
Collecting dominate (from Flask-Bootstrap<3.4,>=3.3->-r requirements.txt (line 7))
  Downloading dominate-2.3.1.tar.gz
Collecting visitor (from Flask-Bootstrap<3.4,>=3.3->-r requirements.txt (line 7))
  Downloading visitor-0.1.3.tar.gz
Collecting blinker (from Flask-Mail<0.10,>=0.9->-r requirements.txt (line 9))
  Downloading blinker-1.4.tar.gz (111kB)
Collecting markdown (from Flask-Markdown<0.4,>=0.3->-r requirements.txt (line 10))
  Downloading Markdown-2.6.10.zip (414kB)
Collecting cffi>=1.1 (from bcrypt<2.1,>=2.0->-r requirements.txt (line 15))
  Downloading cffi-1.11.2-cp36-cp36m-manylinux1_x86_64.whl (419kB)
Collecting six>=1.4.1 (from bcrypt<2.1,>=2.0->-r requirements.txt (line 15))
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker<2.3,>=2.2.1->-r requirements.txt (line 18))
  Downloading websocket_client-0.46.0-py2.py3-none-any.whl (200kB)
Collecting docker-pycreds>=0.2.1 (from docker<2.3,>=2.2.1->-r requirements.txt (line 18))
  Downloading docker_pycreds-0.2.1-py2.py3-none-any.whl
Collecting dockerpty<0.5,>=0.4.1 (from docker-compose<1.13,>=1.12->-r requirements.txt (line 19))
  Downloading dockerpty-0.4.1.tar.gz
Collecting colorama<0.4,>=0.3.7 (from docker-compose<1.13,>=1.12->-r requirements.txt (line 19))
  Downloading colorama-0.3.9-py2.py3-none-any.whl
Collecting docopt<0.7,>=0.6.1 (from docker-compose<1.13,>=1.12->-r requirements.txt (line 19))
  Downloading docopt-0.6.2.tar.gz
Collecting jsonschema<3,>=2.5.1 (from docker-compose<1.13,>=1.12->-r requirements.txt (line 19))
  Downloading jsonschema-2.6.0-py2.py3-none-any.whl
Collecting texttable<0.9,>=0.8.1 (from docker-compose<1.13,>=1.12->-r requirements.txt (line 19))
  Downloading texttable-0.8.8.tar.gz
Collecting cached-property<2,>=1.2.0 (from docker-compose<1.13,>=1.12->-r requirements.txt (line 19))
  Downloading cached_property-1.3.1-py2.py3-none-any.whl
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach<2.0,>=1.5->-r requirements.txt (line 22))
  Downloading html5lib-0.9999999.tar.gz (889kB)
Collecting py>=1.4.29 (from pytest<3.0,>=2.8->-r requirements.txt (line 24))
  Downloading py-1.5.2-py2.py3-none-any.whl (88kB)
Collecting coverage>=3.7.1 (from pytest-cov<3.0,>=2.2->-r requirements.txt (line 25))
  Downloading coverage-4.4.2-cp36-cp36m-manylinux1_x86_64.whl (197kB)
Collecting jedi>=0.10 (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading jedi-0.11.1-py2.py3-none-any.whl (250kB)
Collecting decorator (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading decorator-4.1.2-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.6/site-packages (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
Collecting pexpect; sys_platform != "win32" (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading pexpect-4.3.1-py2.py3-none-any.whl (55kB)
Collecting pickleshare (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading pickleshare-0.7.4-py2.py3-none-any.whl
Collecting pygments (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)
Collecting simplegeneric>0.8 (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading simplegeneric-0.8.1.zip
Collecting traitlets>=4.2 (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading traitlets-4.3.2-py2.py3-none-any.whl (74kB)
Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading prompt_toolkit-1.0.15-py3-none-any.whl (247kB)
Collecting watchdog>=0.8 (from reload<1.0,>=0.9->-r requirements.txt (line 27))
  Downloading watchdog-0.8.3.tar.gz (83kB)
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->Flask<0.11,>=0.10->-r requirements.txt (line 1))
  Downloading MarkupSafe-1.0.tar.gz
Collecting Mako (from alembic>=0.6->Flask-Migrate<1.7,>=1.6->-r requirements.txt (line 3))
  Downloading Mako-1.0.7.tar.gz (564kB)
Collecting python-editor>=0.3 (from alembic>=0.6->Flask-Migrate<1.7,>=1.6->-r requirements.txt (line 3))
  Downloading python-editor-1.0.3.tar.gz
Collecting python-dateutil (from alembic>=0.6->Flask-Migrate<1.7,>=1.6->-r requirements.txt (line 3))
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
Collecting pycparser (from cffi>=1.1->bcrypt<2.1,>=2.0->-r requirements.txt (line 15))
  Downloading pycparser-2.18.tar.gz (245kB)
Collecting parso==0.1.1 (from jedi>=0.10->ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading parso-0.1.1-py2.py3-none-any.whl (91kB)
Collecting ptyprocess>=0.5 (from pexpect; sys_platform != "win32"->ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading ptyprocess-0.5.2-py2.py3-none-any.whl
Collecting ipython-genutils (from traitlets>=4.2->ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.4->ipython<7.0,>=6.0->-r requirements.txt (line 26))
  Downloading wcwidth-0.1.7-py2.py3-none-any.whl
Collecting argh>=0.24.1 (from watchdog>=0.8->reload<1.0,>=0.9->-r requirements.txt (line 27))
  Downloading argh-0.26.2-py2.py3-none-any.whl
Collecting pathtools>=0.1.1 (from watchdog>=0.8->reload<1.0,>=0.9->-r requirements.txt (line 27))
  Downloading pathtools-0.1.2.tar.gz
Installing collected packages: Werkzeug, MarkupSafe, Jinja2, itsdangerous, Flask, SQLAlchemy, Flask-SQLAlchemy, Mako, python-editor, six, python-dateutil, alembic, Flask-Script, Flask-Migrate, Flask-Login, blinker, Flask-Mail, Flask-Principal, WTForms, Flask-WTF, passlib, Flask-Security, dominate, visitor, Flask-Bootstrap, markdown, Flask-Markdown, html5lib, bleach, Flask-Bleach, Flask-Analytics, waitress, psycopg2, pycparser, cffi, bcrypt, cachetools, PyYAML, websocket-client, requests, docker-pycreds, docker, dockerpty, colorama, docopt, jsonschema, texttable, cached-property, docker-compose, dumb-init, py, pytest, coverage, pytest-cov, parso, jedi, decorator, ptyprocess, pexpect, pickleshare, pygments, simplegeneric, ipython-genutils, traitlets, wcwidth, prompt-toolkit, ipython, argh, pathtools, watchdog, reload
  Running setup.py install for MarkupSafe: started
    Running setup.py install for MarkupSafe: finished with status 'done'
  Running setup.py install for itsdangerous: started
    Running setup.py install for itsdangerous: finished with status 'done'
  Running setup.py install for Flask: started
    Running setup.py install for Flask: finished with status 'done'
  Running setup.py install for SQLAlchemy: started
    Running setup.py install for SQLAlchemy: finished with status 'done'
  Running setup.py install for Mako: started
    Running setup.py install for Mako: finished with status 'done'
  Running setup.py install for python-editor: started
    Running setup.py install for python-editor: finished with status 'done'
  Running setup.py install for alembic: started
    Running setup.py install for alembic: finished with status 'done'
  Running setup.py install for Flask-Script: started
    Running setup.py install for Flask-Script: finished with status 'done'
  Running setup.py install for Flask-Migrate: started
    Running setup.py install for Flask-Migrate: finished with status 'done'
  Running setup.py install for Flask-Login: started
    Running setup.py install for Flask-Login: finished with status 'done'
  Running setup.py install for blinker: started
    Running setup.py install for blinker: finished with status 'done'
  Running setup.py install for Flask-Mail: started
    Running setup.py install for Flask-Mail: finished with status 'done'
  Running setup.py install for Flask-Principal: started
    Running setup.py install for Flask-Principal: finished with status 'done'
  Running setup.py install for WTForms: started
    Running setup.py install for WTForms: finished with status 'done'
  Running setup.py install for Flask-WTF: started
    Running setup.py install for Flask-WTF: finished with status 'done'
  Running setup.py install for Flask-Security: started
    Running setup.py install for Flask-Security: finished with status 'done'
  Running setup.py install for dominate: started
    Running setup.py install for dominate: finished with status 'done'
  Running setup.py install for visitor: started
    Running setup.py install for visitor: finished with status 'done'
  Running setup.py install for Flask-Bootstrap: started
    Running setup.py install for Flask-Bootstrap: finished with status 'done'
  Running setup.py install for markdown: started
    Running setup.py install for markdown: finished with status 'done'
  Running setup.py install for Flask-Markdown: started
    Running setup.py install for Flask-Markdown: finished with status 'done'
  Running setup.py install for html5lib: started
    Running setup.py install for html5lib: finished with status 'done'
  Running setup.py install for Flask-Bleach: started
    Running setup.py install for Flask-Bleach: finished with status 'done'
  Running setup.py install for waitress: started
    Running setup.py install for waitress: finished with status 'done'
  Running setup.py install for psycopg2: started
    Running setup.py install for psycopg2: finished with status 'done'
  Running setup.py install for pycparser: started
    Running setup.py install for pycparser: finished with status 'done'
  Running setup.py install for bcrypt: started
    Running setup.py install for bcrypt: finished with status 'done'
  Running setup.py install for PyYAML: started
    Running setup.py install for PyYAML: finished with status 'done'
  Running setup.py install for dockerpty: started
    Running setup.py install for dockerpty: finished with status 'done'
  Running setup.py install for docopt: started
    Running setup.py install for docopt: finished with status 'done'
  Running setup.py install for texttable: started
    Running setup.py install for texttable: finished with status 'done'
  Running setup.py install for dumb-init: started
    Running setup.py install for dumb-init: finished with status 'done'
  Running setup.py install for simplegeneric: started
    Running setup.py install for simplegeneric: finished with status 'done'
  Running setup.py install for pathtools: started
    Running setup.py install for pathtools: finished with status 'done'
  Running setup.py install for watchdog: started
    Running setup.py install for watchdog: finished with status 'done'
  Running setup.py install for reload: started
    Running setup.py install for reload: finished with status 'done'
Successfully installed Flask-0.10.1 Flask-Analytics-0.5.5 Flask-Bleach-0.0.2 Flask-Bootstrap-3.3.7.1 Flask-Login-0.2.11 Flask-Mail-0.9.1 Flask-Markdown-0.3 Flask-Migrate-1.6.0 Flask-Principal-0.4.0 Flask-SQLAlchemy-2.3.2 Flask-Script-2.0.6 Flask-Security-1.7.4 Flask-WTF-0.12 Jinja2-2.10 Mako-1.0.7 MarkupSafe-1.0 PyYAML-3.11 SQLAlchemy-1.2.0 WTForms-2.1 Werkzeug-0.14.1 alembic-0.9.6 argh-0.26.2 bcrypt-2.0.0 bleach-1.5.0 blinker-1.4 cached-property-1.3.1 cachetools-1.1.6 cffi-1.11.2 colorama-0.3.9 coverage-4.4.2 decorator-4.1.2 docker-2.2.1 docker-compose-1.12.0 docker-pycreds-0.2.1 dockerpty-0.4.1 docopt-0.6.2 dominate-2.3.1 dumb-init-1.0.3 html5lib-0.9999999 ipython-6.2.1 ipython-genutils-0.2.0 itsdangerous-0.24 jedi-0.11.1 jsonschema-2.6.0 markdown-2.6.10 parso-0.1.1 passlib-1.7.1 pathtools-0.1.2 pexpect-4.3.1 pickleshare-0.7.4 prompt-toolkit-1.0.15 psycopg2-2.6.2 ptyprocess-0.5.2 py-1.5.2 pycparser-2.18 pygments-2.2.0 pytest-2.9.2 pytest-cov-2.5.1 python-dateutil-2.6.1 python-editor-1.0.3 reload-0.9 requests-2.7.0 simplegeneric-0.8.1 six-1.11.0 texttable-0.8.8 traitlets-4.3.2 visitor-0.1.3 waitress-0.8.10 watchdog-0.8.3 wcwidth-0.1.7 websocket-client-0.46.0
Removing intermediate container dc170b7afcbb
 ---> a33013b3f3bd
Step 2/4 : ENV PYTHONUNBUFFERED=1
 ---> Running in de6e8c84b628
Removing intermediate container de6e8c84b628
 ---> 6f31443d23a4
Step 3/4 : ENTRYPOINT ["python3", "puffin.py"]
 ---> Running in 92fd34cc3c7a
Removing intermediate container 92fd34cc3c7a
 ---> 85f2b8c45810
Step 4/4 : CMD ["up"]
 ---> Running in 0454f421b853
Removing intermediate container 0454f421b853
 ---> c8dacc2bbdb6
Successfully built c8dacc2bbdb6
Successfully tagged puffinrocks/puffin:latest
WARNING: Image for service puffin was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Pulling dnsfix (sequenceiq/alpine-dig:latest)...
latest: Pulling from sequenceiq/alpine-dig
aac0c133338d: Pull complete
f1807b252f4e: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:edb82b6b7d5a59a6129fb274be003f8caa0b6ae32c64ff517f9bde9b9c0b5fc0
Status: Downloaded newer image for sequenceiq/alpine-dig:latest
Creating puffin_mailhog_1
Creating puffin_dns_1
Creating puffin_puffindb_1

ERROR: for dns  Cannot start service dns: driver failed programming external connectivity on endpoint puffin_dns_1 (1fdd0aa854ba3e9d09971d0ddb99beb759851408630bff922b93d8528f55b5a3): Error starting userland proxy: listen udp 0.0.0.0:53: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Nginx config

Hi,

I am having trouble uploading a ~50mb file to an application. I get a 413 error (Request entity too large) with no errors from the app itself.

I think the problem is with nginx and I would like to inspect the config files, however I cant find. Can you point me in the right direction please?

error trying to install/run

I got the message before restart when trying "docker-machine create -d virtualbox dev". reboot didn't work for me on opensuse 13.2

I had to do a is sudo modprobe vboxnetadp then VirtualBox restart but its now giving me the message after noted below

Message before restart
derr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg_, int, int_)" at line 66 of file VBoxManageHostonly.cpp

Message after
server6:~ # docker-machine create -d virtualbox dev
Running pre-create checks...
Creating machine...
Error creating machine: Error in driver during machine creation: exit status 1

questions about api

Hello
I am looking for a bug in puffin using fuzzer
This is the plan to be reported to you.

However, there are questions
Do you know the puffin API list or document?
I really want to make sure that the bugs I found are triggered outside.
BR

Simplify Puffin installation procedure

Hi!
I really think the problem you are trying to solve is important one. I believe there in few years there will be big selfhosting comeback. I know many people who would like to selfhost with raspberry pis but they are no linux admins. Your project is trying to solve that but it still requires you to understand command line to do initial install.

Were you thinking about how this could be solved? Maybe prepared linux image with puffin preinstaled? Also there is lot of complications with DNS managment.

Only way something like puffin can become mainstream is if it is as easy to install and manage as Android phone.

Why this project is not getting more popular?

Is there any reason why this project is not very active, even if technology-wise it looks very promising? Adding apps with a simple docker-compose file, able to use with or without puffin is just great!

Are there maybe competing projects?

Switch from docker-compose to Kubernetes

I am personally not convinced that it would be that useful, since Puffin is focusing on running small separate decentralized applications for many users, so I don't see much value brought by Kubernetes, which is a large application orchestration solution.

On the other hand Kubernetes is becoming de-facto standard software deployment technology. In addition to established players such as Helm, everyone else seems to be switching to it - Rancher, libre.sh, even Docker itself is supporting it natively. Also more and more cloud infrastructure providers now support Kubernetes natively (Google Cloud, AWS), so deploying it doesn't require managing a server anymore and is easier than installing Docker. However, the prices for running containers on EKS are still very high (similar to Joyent's Triton, which exists since a long time). It suggests there's no real support multi-tenancy, which will the price of running an app close to zero, which is the ultimate objective of containers from my point of view.

Any thoughts?

Various UI changes in progress

Hey there,

First off let me just say.. Wow! Puffin Rocks!

I discovered it a few days ago on Kickball/awesome-selfhosted while searching for something to manage docker applications on my home server and fell in love with it. I’ve been hacking at it over the past weekend and I’d like to show you my changes and see what you think.

image

On the main page I restyled the application thumbnails in a way that I find easier to browse.

image

The My Applications page uses a new card that includes controls for each of the running applications.

image

The My Applications page now also shows applications that the user has previously started but are currently stopped (applications that have created volumes actually)

image

On the Application page its readme is displayed inside a tabbed panel.

image

A logged in user’s application page includes additional tabs that show information about running containers, volumes, and backups. The application controls are now located at the top of the page.

image

On the containers tab I’d like to be able to click “Logs” and see the docker-compose logs for that container with streaming updates. I’d also like to show memory/cpu usage stats.

image

The Volumes tab doesn’t show much right now. I’d like to get disk usage stats

image

The backup tab lists all the backups. This can be kinda slow right now since the backup module spins up the backup application to get the list. I was thinking about extending the backup module to track backups in the database. I’d also like to make the Restore/Download/Delete buttons functional.

I noticed the other issue about separating the UI from the API. I was thinking of playing around with Flask-RESTPlus.. but that's a topic for another issue :)

Thanks for building this awesome piece of tech! If there's specific changes you like I can pull them out into smaller pull requests, just let me know.

~ Justin

Feature Request: Custom Random Passwords

I saw that the default admin passwords in puffin.rocks are password and admin etc. Keeping the principle of secure by default in mind, I would love to see random generated administrator passwords. The passwords should be displayed in the application page.

screenshot-2018-6-4 puffin redmine

For example, in the screenshot above instead of password: admin, there would be password: bN$bg5t67ujh45hbni98/&ZHJ&Tv. Each password should be generated during the container start phase and displayed to the user.

Use HTTPS for Puffin

Puffin registration, login and the app catalog administration don't use HTTPS. However, the moment user register or login into the website they transfer their sensitive password from the client to the puffin server. The traffic between the user (client) and puffin (server) has to be always encrypted, so please use HTTPS.

How about Puffin Web Browser.rpm/.deb ?

How about Puffin Web Browser.rpm/.deb ?
Would Puffin Web Browser be coming for Linux ?
Chrome done, Edge doing, Puffin should catch the linux users
to improve the market competitiveness.

Still active, or accepting contributions?

Hello!

I was looking for a "homebrew for servers" on reddit and someone suggested me puffin. I think the idea is great, but sadly the development seem to have stalled.

I would personally be happy to start contributing, fixing things, adding new packages, etc. if you are also OK with that. I just wanted know if you are open to new contributions/contributors.

Thanks for the good work!
Bora

unable to recursively clone repo as per the readme

Sorry if I'm missing something obvious but I'm unable to clone the repo recursively

m@minty ~ $ git clone --recursive [email protected]:puffinrocks/puffin.git
Cloning into 'puffin'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

docker-compose up failed, gnu-crypt.h missing

Hi,

I've tried to start puffin on a raspberry pi, but I've got the following error during the build process of the puffin image:

    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isrc/crypt_blowfish-1.3 -I/usr/local/include/python3.6m -c build/temp.linux-armv7l-3.6/_bcrypt.c -o build/temp.linux-armv7l-3.6/build/temp.linux-armv7l-3.6/_bcrypt.o
    In file included from /usr/local/include/python3.6m/Python.h:39:0,
                     from build/temp.linux-armv7l-3.6/_bcrypt.c:28:
    src/crypt_blowfish-1.3/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory
     #include <gnu-crypt.h>
                           ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-y5dgfqms/bcrypt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-8i0pdy9l-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-y5dgfqms/bcrypt/
ERROR: Service 'puffin' failed to build: The command '/bin/sh -c pip install --no-cache-dir -r requirements.txt' returned a non-zero code: 1

I understand that gnu-crypt.h is not available in the puffin docker image. Could this be right ? Or should it be installed on the host ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.