GithubHelp home page GithubHelp logo

boran / webfact Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 619 KB

Webfactory: docker container management with Drupal

License: GNU General Public License v2.0

PHP 94.51% CSS 0.37% JavaScript 1.29% Shell 1.83% SQLPL 2.00%

webfact's Introduction

The Webfactory (https://github.com/Boran/webfact) provides a UI to interface to the Docker API, allowing operations on containers/images. It aims to streamline dev and operations for Drupal websites.

The Webfactory consists of several components

  • The module: webfact (main logic), webfact_content_types (features/views), webfact_theme (bootstrap UI), webfact-make (build/install), webfactapi (optional remote control) and webfactory (deprecated).
  • For Drupal build automation: The boran/drupal docker image (on docker hub).

You need:

  • Docker server (e.g. Ubuntu 14.04) with docker 1.7 or later
  • A container for the webfactory (e.g. the drupal lamp container https://github.com/Boran/docker-drupal)
  • Docker-php library
  • Drupal + contrib modules and the bootstrap theme*
  • This module and the modules above

Version

This is still in beta and in a state of flux, but used on several servers. No version tagging yet.

Installation

See the readme in the https://github.com/Boran/webfact-make repo.

TODO

The issue queue in this repo with the meta list #2. See also the related https://github.com/Boran/docker-drupal/issues and https://github.com/Boran/webfact-make/issues

Programming notes

See test.php cmdline.php for examples on using the apis and testing individual functions.

  • Tested with Docker API v1.20 and docker 1.8.1
  • The docker-php library (https://github.com/stage1/docker-php)
  • The guzzle http client is used. This makes porting to Drupal 8 easier (if fact the first attempt was on Drupal 8 and then focus was shifted back to D7) - hence the dependancy on the composer_manager module.

webfact's People

Contributors

boran avatar jbartsch avatar perdjesk avatar sgc-drop42 avatar schisnall avatar

Stargazers

akkonrad avatar  avatar Theodoros Ploumis avatar  avatar Dave Hall avatar

Watchers

Katie Te Nahu Owen avatar  avatar MaciejLukianski avatar James Cloos avatar  avatar

webfact's Issues

TODOs

An initial list, these should become separate issues to track later. The list covers changes to the main modules: webfact, webfact_content_types and webfact_theme with links to others below.

Bugs

  • admin/reports/dblog "Recoverable fatal error: Argument 2 passed to t() must be of the type array, integer given, called in /var/www/html/modules/dblog/dblog.admin.inc on line 295"
  • Notice: Trying to get property of non-object in WebfactController->load_meta() (line 226 of /var/www/html/sites/all/modules/custom/webfact/controller.php).

Features

  • (done) status page: show the real auto-start setting in the container too.
  • (done) pull status information from within the container, e.g. git commit/version
  • (done) Way to update websites in containers in one click
  • (done) If you delete a "website" (content page), then also delete the containers and relevant images too.
  • (done) run command: box is too small
  • create website:
    • (done) force lowercase hostnames (important to avoid errors)
    • if the image used for a new container does not exist, it should try to download it automatically from dockerhub
  • (done) Controller: after rebuild error go to /advanced, not back to the rebuild page!
  • navigation
  • how to upload files (sql dumps etc.) to a container (see "couploadfile" in controller, work has started). http://stackoverflow.com/questions/22907231/copying-files-from-host-to-docker-containerWould have to upload the tar file to a directory on the webfact container (maybe with Drupal file_save_upload()), then run docker exec to transfer and extract that tar file. docker-php/docker-php#90 (comment)
  • How to upload a container (or image) that was exported from another webfactory? Export already works. i.e. to import a container to one server after exporting it from another. Or upload a container that was developed locally.
  • container status screen
    • view logs: add timestamp
    • logs: stream continuously. Sample code added but not in realtime, see 'logtail' in controller.php and test.php
  • web operations after creation

Docker API implementation:

Other:

  • general review/refactor of the webfact module: after the first few months of organic development, an objective review would be good
  • generate DRUPAL_ADMIN_PW & inform (don't use a fixed one?)
  • Improve Guzzle errorhandling for initial connection (if docker port not reachable)
  • Theme:

TODOs from related modules

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.