PHPackages                             indatus/assembler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. indatus/assembler

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

indatus/assembler
=================

Easy construction and packaging of docker containers using simple configuration scripts.

v1.3.0(11y ago)2162MITPHPPHP &gt;=5.4.0

Since Apr 27Pushed 11y ago4 watchersCompare

[ Source](https://github.com/Indatus/assembler)[ Packagist](https://packagist.org/packages/indatus/assembler)[ Docs](https://github.com/indatus/assembler)[ RSS](/packages/indatus-assembler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (8)Versions (6)Used By (0)

Assembler
=========

[](#assembler)

[![Latest Version](https://camo.githubusercontent.com/f9c5ce570e1ef80fa402cb3dfab847e17a98c6f19a5b860d5a0deafaca7c8e03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696e64617475732f617373656d626c65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/indatus/assembler/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/f528dd43a83e83ea4c2d64e31b60c58eb963b4f765e62864e8977a77cdd81616/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f496e64617475732f617373656d626c65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Indatus/assembler)[![Coverage Status](https://camo.githubusercontent.com/fee4ea54ac726b68aa52dffdb33ed2ca02d3f63eb4ad6b5d424ceda3318263e4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f696e64617475732f617373656d626c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/indatus/assembler/code-structure)[![Quality Score](https://camo.githubusercontent.com/b5199b67437cdd8e8e273cbbef8918dc27ce0f9d610cacf336b1b0405054843f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696e64617475732f617373656d626c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/indatus/assembler)[![Total Downloads](https://camo.githubusercontent.com/7ddf18949ef488934e983016325e8435497d09357afc58abe5dabce2f09c77e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e64617475732f617373656d626c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/indatus/assembler)

Assembler allows you to easily construct and package docker containers using existing config scripts. Currently you can build containers using saltstack only, but there are plans to add the ability to provision using any configuration management tool such as puppet, chef, and ansible.

Requirements
------------

[](#requirements)

- Docker
- PHP 5.4+
- Salt

Install
-------

[](#install)

Via Composer

```
$ composer create-project indatus/assembler
```

Usage
-----

[](#usage)

Assembler uses [Robo](http://robo.li/) to run tasks on the command line. This allows Assembler to wrap docker commands, so you will need to have docker installed wherever you run it. There is a vagrant file in the root of this repo that will bootstrap `ubuntu/trusty64` with docker and php5 which will allow you to run assembler. Additionally you will need to configure an ssh forward agent by:

```
vi ~/.ssh/config
```

then append:

```
host 172.17.8.150
    ForwardAgent yes
```

then run if you do not already have an id\_rsa key:

```
ssh-add
```

then just call `vagrant up`.

If everything goes according to plan, you should be able to start running assembler.

Terminology
-----------

[](#terminology)

This project extends a metaphor from manufacturing to building and deploying applications. Docker containers are [stocked](#stocking), [fabricated](#fabricating), [loaded](#loading), and [packaged](#packaging) based on settings specified in a [product line](#product-line).

### Product Line

[](#product-line)

A product line is simply a yaml file specifying the raw goods or base services that your product needs to run.

Consider the following example:

```
raw_goods:
  - mysql:
    - user: root
    - password: password
  - php
suppliers:
  - git@github.com:saltstack-formulas/mysql.git
  - git@github.com:saltstack-formulas/php.git
userData: config/provision.sh # optional
```

The above yaml represents a product line that tells assembler you want a container with mysql that has a root user with a password of password. Additionally it tells assembler where to find those raw goods as suppliers. You will need salt states available for each of the raw goods to be provisioned onto the Docker container.

### Stocking

[](#stocking)

You stock goods by running `assembler:stock` and specifying a product line to stock example below:

```
$ robo assembler:stock my_webserver --goods-path=./goods
```

The above command will find the my\_webserver.yml file git clone the raw goods and automatically generate a top.sls file for use by salt

### Fabricating

[](#fabricating)

You 'fabricate' containers based on a base image derived from a docker file for example:

```
$ robo assembler:fabricate /path/to/dockerfile/ mybaseimagename
```

The above command will build a base image based on the specified docker file.

### Loading

[](#loading)

You 'load' containers with the raw goods specified in your production line for example:

```
$ robo assembler:load mybaseimagename /path/to/goods/
```

The above command will load all of the goods from the specified path. The '/path/to/goods' would be the same path specified by --goods-path in the stock task.

### Packaging

[](#packaging)

You 'package' containers that have been stocked, fabricated, and loaded. For example:

```
$ robo assembler:package somecontainerid myrepo/name
```

This will commit the specified containerid into a docker image additionally if you specify the --push flag the package command will actually push the committed image to myrepo/name. To push you will need to specify your username, password, and email for the dockerregistry you are pushing to.

### Making

[](#making)

The make command will do everything in one fail swoop. For example:

```
$ robo assembler:make my_base_product
```

will stock, fabricate, load, and package your containers

### Shipping

[](#shipping)

The ship command will login to a Docker host server via SSH and pull a Docker image and run the container instance.

```
robo ship leftyhitchens/mysql:5.2 192.168.1.100 --ports="3306:3306" --remote_command="mysqld_safe" --sudo

```

The above command will login to the server `192.168.1.100` via SSH and execute the following commands as `sudo`:

```
sudo docker pull leftyhitchens/mysql:5.2
sudo docker run -d --name leftyhitchens_mysql_5.2_ -p 3306:3306 mysqld_safe

```

Provisioning
============

[](#provisioning)

Configuration
-------------

[](#configuration)

You can specify which cloud provider assembler needs to ship the container to via the `provisioning.yaml`file. You will keep your public api token for individual providers here, along with any default ssh keys you like to be installed on the newly provisioned box. There is an example file in the `config` directory here, or you can look at the example below.

```
provider: digitalocean
tokens:
   digitalocean: yoursuperlongapitoken111
ssh:
  keys:
    - 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
userData: config/provision.sh # optional
```

`userData` key provides a path to a [DigitalOcean cloud config](http://cloudinit.readthedocs.org/en/latest/topics/examples.html)script. This will be executed during your droplet's creation and can be used for provisioning.

Running
-------

[](#running)

You can provision a server on digital ocean using the 'provision' command as below:

```
robo provision myhostname

```

The above will use the information in your config file to create a droplet on digital ocean with the specified hostname as 'my\_host\_name'. A .machine file will be created with the form .machinemyhostname and will contain data about the created machine below is an example

```
id: 5083234
hostname: myhostname
region: nyc3
size: 512mb
image: docker
backups: false
ipv6: false
privatenetworking: false
```

You can destroy the cloud server using the 'destroy' command as below:

```
robo destroy .machinemyhostname

```

Where the value .machinemyhostname is the path to the machine file provisioned before

Testing
-------

[](#testing)

```
$ phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email , , or  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

4023d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d33fb3417cef8cc3a8229e657bd10f0bea397f5125de374ef53f1dc9fcf01ca9?d=identicon)[jlaswell](/maintainers/jlaswell)

---

Top Contributors

[![jlaswell](https://avatars.githubusercontent.com/u/1676217?v=4)](https://github.com/jlaswell "jlaswell (7 commits)")[![thomasbellio](https://avatars.githubusercontent.com/u/5281642?v=4)](https://github.com/thomasbellio "thomasbellio (2 commits)")[![michaelbunch](https://avatars.githubusercontent.com/u/1794018?v=4)](https://github.com/michaelbunch "michaelbunch (1 commits)")

---

Tags

containerdockerprovisioningassemblerindatus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/indatus-assembler/health.svg)

```
[![Health](https://phpackages.com/badges/indatus-assembler/health.svg)](https://phpackages.com/packages/indatus-assembler)
```

###  Alternatives

[maclof/kubernetes-client

A simple yet elegant client for accessing and controlling a Kubernetes cluster.

235889.1k4](/packages/maclof-kubernetes-client)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
