Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate multicontainer package #742

Merged
merged 3 commits into from
Dec 21, 2017
Merged
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
9 changes: 9 additions & 0 deletions bin/resin-mc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node
var hidepath = require('hidepath');
var userHome = require('home-or-tmp');
var path = require('path');

process.env.RESINRC_RESIN_URL = process.env.RESINRC_RESIN_URL || 'multi.resinstaging.io'
process.env.RESINRC_DATA_DIRECTORY = process.env.RESINRC_DATA_DIRECTORY || path.join(userHome, hidepath('resin-mc'))

require('../build/app');
61 changes: 47 additions & 14 deletions doc/cli.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1427,12 +1427,19 @@ name of container to stop

## build [source]

Use this command to build a container with a provided docker daemon.
Use this command to build an image or a complete multi-container project
with the provided docker daemon.

You must provide either an application or a device-type/architecture
pair to use the resin Dockerfile pre-processor
(e.g. Dockerfile.template -> Dockerfile).

This command will look into the given source directory (or the current working
directory if one isn't specified) for a compose file. If one is found, this
command will build each service defined in the compose file. If a compose file
isn't found, the command will look for a Dockerfile, and if yet that isn't found,
it will try to generate one.

Examples:

$ resin build
Expand All @@ -1456,6 +1463,18 @@ The type of device this build is for

The target resin.io application this build is for

#### --projectName, -n <projectName>

Specify an alternate project name; default is the directory name

#### --emulated, -e

Run an emulated build using Qemu

#### --inlinelogs

Display all log output from builds inline as a stream

#### --docker, -P <docker>

Path to a local docker socket
Expand Down Expand Up @@ -1492,43 +1511,61 @@ Set a build-time variable (eg. "-B 'ARG=value'"). Can be specified multiple time

Don't use docker layer caching when building

#### --emulated, -e

Run an emulated build using Qemu

#### --squash

Squash newly built layers into a single new layer

## deploy <appName> [image]

Use this command to deploy an image to an application, optionally building it first.
Use this command to deploy an image or a complete multi-container project
to an application, optionally building it first.

Usage: `deploy <appName> ([image] | --build [--source build-dir])`

Unless an image is specified, this command will look into the current directory
(or the one specified by --source) for a compose file. If one is found, this
command will deploy each service defined in the compose file, building it first
if an image for it doesn't exist. If a compose file isn't found, the command
will look for a Dockerfile, and if yet that isn't found, it will try to
generate one.

To deploy to an app on which you're a collaborator, use
`resin deploy <appOwnerUsername>/<appName>`.

Note: If building with this command, all options supported by `resin build`
are also supported with this command.

Examples:

$ resin deploy myApp
$ resin deploy myApp --build --source myBuildDir/
$ resin deploy myApp myApp/myImage

### Options

#### --build, -b

Build image then deploy
Force a rebuild before deploy

#### --nologupload

Don't upload build logs to the dashboard with image (if building)

#### --projectName, -n &#60;projectName&#62;

Specify an alternate project name; default is the directory name

#### --source, -s &#60;source&#62;

The source directory to use when building the image
Specify an alternate project directory; default is the working directory

#### --nologupload
#### --emulated, -e

Don't upload build logs to the dashboard with image (if building)
Run an emulated build using Qemu

#### --inlinelogs

Display all log output from builds inline as a stream

#### --docker, -P &#60;docker&#62;

Expand Down Expand Up @@ -1566,10 +1603,6 @@ Set a build-time variable (eg. "-B 'ARG=value'"). Can be specified multiple time

Don't use docker layer caching when building

#### --emulated, -e

Run an emulated build using Qemu

#### --squash

Squash newly built layers into a single new layer
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "resin-cli",
"name": "resin-cli-mc",
"version": "6.10.2",
"description": "The official resin.io CLI tool",
"description": "The official resin.io CLI tool, for our pre-release multicontainer environment",
"main": "./build/actions/index.js",
"homepage": "https://github.com/resin-io/resin-cli",
"repository": {
Expand All @@ -16,7 +16,7 @@
"lib/"
],
"bin": {
"resin": "./bin/resin"
"resin-mc": "./bin/resin-mc"
},
"scripts": {
"build": "gulp build && tsc && npm run doc",
Expand Down Expand Up @@ -75,6 +75,8 @@
"express": "^4.13.3",
"global-tunnel-ng": "github:zvin/global-tunnel#dont-proxy-connections-to-file-sockets",
"hasbin": "^1.2.3",
"hidepath": "^1.0.1",
"home-or-tmp": "^3.0.0",
"humanize": "0.0.9",
"inquirer": "^3.1.1",
"is-root": "^1.0.0",
Expand Down