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

[hab] Add hab studio subcommand. #567

Merged
merged 1 commit into from
May 27, 2016
Merged

[hab] Add hab studio subcommand. #567

merged 1 commit into from
May 27, 2016

Conversation

fnichol
Copy link
Collaborator

@fnichol fnichol commented May 26, 2016

This change introduces a new top-level subcommand noun: studio. The
implementation logic is virtually identical to the hab sup subcommand,
meaning that the core/hab-studio package is installed if not present
and then directly invoked via an exec(1) syscall.

> hab
hab 0.5.0

Authors: The Habitat Maintainers <[email protected]>

"A Habitat is the natural environment for your services" - Alan Turing

USAGE:
    hab [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    artifact    Commands relating to Habitat artifacts
    config      Commands relating to Habitat runtime config
    file        Commands relating to Habitat files
    help        Prints this message or the help of the given subcommand(s)
    origin      Commands relating to Habitat origin keys
    pkg         Commands relating to Habitat packages
    ring        Commands relating to Habitat rings
    service     Commands relating to Habitat services
    studio      Commands relating to Habitat Studios
    sup         Commands relating to the Habitat Supervisor
    user        Commands relating to Habitat users
ALIASES:
    apply       Alias for: 'config apply'
    install     Alias for: 'pkg install'
    start       Alias for: 'sup start'

> hab studio -t busybox enter
∵ Package for core/hab-studio not found, installing
» Installing core/hab-studio
↓ Downloading core/hab-studio/0.5.0/20160524185743
    2.52 MB / 2.52 MB / [==================] 100.00 % 49.32 MB/s
✓ Installed core/hab-studio/0.5.0/20160524185743
★ Install of core/hab-studio complete with 1 packages installed.
   hab-studio: Creating Studio at /hab/studios/src (busybox)
   hab-studio: Entering Studio at /hab/studios/src (busybox)

[#][busybox:/src:0]# exit

> hab stu rm
   hab-studio: Destroying Studio at /hab/studios/src (busybox)

gif-keyboard-15351413531070600140

This change introduces a new top-level subcommand noun: `studio`. The
implementation logic is virtually identical to the `hab sup` subcommand,
meaning that the `core/hab-studio` package is installed if not present
and then directly invoked via an `exec(1)` syscall.

```sh
> hab
hab 0.5.0

Authors: The Habitat Maintainers <[email protected]>

"A Habitat is the natural environment for your services" - Alan Turing

USAGE:
    hab [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    artifact    Commands relating to Habitat artifacts
    config      Commands relating to Habitat runtime config
    file        Commands relating to Habitat files
    help        Prints this message or the help of the given subcommand(s)
    origin      Commands relating to Habitat origin keys
    pkg         Commands relating to Habitat packages
    ring        Commands relating to Habitat rings
    service     Commands relating to Habitat services
    studio      Commands relating to Habitat Studios
    sup         Commands relating to the Habitat Supervisor
    user        Commands relating to Habitat users
ALIASES:
    apply       Alias for: 'config apply'
    install     Alias for: 'pkg install'
    start       Alias for: 'sup start'

> hab studio -t busybox enter
∵ Package for core/hab-studio not found, installing
» Installing core/hab-studio
↓ Downloading core/hab-studio/0.5.0/20160524185743
    2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s  ✓ Installed core/hab-studio/0.5.0/20160524185743
★ Install of core/hab-studio complete with 1 packages installed.
   hab-studio: Creating Studio at /hab/studios/src (busybox)
   hab-studio: Entering Studio at /hab/studios/src (busybox)

[#][busybox:/src:0]# exit

> hab stu rm
   hab-studio: Destroying Studio at /hab/studios/src (busybox)
```

Signed-off-by: Fletcher Nichol <[email protected]>
@thesentinels
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @metadave and @reset to be potential reviewers

@fnichol
Copy link
Collaborator Author

fnichol commented May 26, 2016

Note that in the example above I used a busybox type Studio, only because it was quick to execute and had very little output--the default type studio works like cake 😉

We have a pretty powerful primitive now in:

hab studio build plans/hab-backline

@@ -5,8 +5,17 @@
// the Software until such time that the Software is made available under an
// open source license such as the Apache 2.0 License.

use env as henv;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't conflict with std::env since you aren't importing it. I don't think you need to import as henv

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're totally right, I bet that was straight up use copy pasta

@reset
Copy link
Collaborator

reset commented May 26, 2016

@thesentinels r+

gif-keyboard-17209019875014584882

@thesentinels
Copy link
Contributor

📌 Commit 7064db0 has been approved by reset

@thesentinels
Copy link
Contributor

⌛ Testing commit 7064db0 with merge f2f5023...

thesentinels pushed a commit that referenced this pull request May 27, 2016
This change introduces a new top-level subcommand noun: `studio`. The
implementation logic is virtually identical to the `hab sup` subcommand,
meaning that the `core/hab-studio` package is installed if not present
and then directly invoked via an `exec(1)` syscall.

```sh
> hab
hab 0.5.0

Authors: The Habitat Maintainers <[email protected]>

"A Habitat is the natural environment for your services" - Alan Turing

USAGE:
    hab [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    artifact    Commands relating to Habitat artifacts
    config      Commands relating to Habitat runtime config
    file        Commands relating to Habitat files
    help        Prints this message or the help of the given subcommand(s)
    origin      Commands relating to Habitat origin keys
    pkg         Commands relating to Habitat packages
    ring        Commands relating to Habitat rings
    service     Commands relating to Habitat services
    studio      Commands relating to Habitat Studios
    sup         Commands relating to the Habitat Supervisor
    user        Commands relating to Habitat users
ALIASES:
    apply       Alias for: 'config apply'
    install     Alias for: 'pkg install'
    start       Alias for: 'sup start'

> hab studio -t busybox enter
∵ Package for core/hab-studio not found, installing
» Installing core/hab-studio
↓ Downloading core/hab-studio/0.5.0/20160524185743
    2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s  ✓ Installed core/hab-studio/0.5.0/20160524185743
★ Install of core/hab-studio complete with 1 packages installed.
   hab-studio: Creating Studio at /hab/studios/src (busybox)
   hab-studio: Entering Studio at /hab/studios/src (busybox)

[#][busybox:/src:0]# exit

> hab stu rm
   hab-studio: Destroying Studio at /hab/studios/src (busybox)
```

Signed-off-by: Fletcher Nichol <[email protected]>

Pull request: #567
Approved by: reset
@thesentinels
Copy link
Contributor

☀️ Test successful - travis

@thesentinels thesentinels merged commit 7064db0 into master May 27, 2016
@fnichol fnichol deleted the fnichol/hab-studio branch May 27, 2016 04:00
jtimberman pushed a commit that referenced this pull request Jun 12, 2016
This change introduces a new top-level subcommand noun: `studio`. The
implementation logic is virtually identical to the `hab sup` subcommand,
meaning that the `core/hab-studio` package is installed if not present
and then directly invoked via an `exec(1)` syscall.

```sh
> hab
hab 0.5.0

Authors: The Habitat Maintainers <[email protected]>

"A Habitat is the natural environment for your services" - Alan Turing

USAGE:
    hab [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    artifact    Commands relating to Habitat artifacts
    config      Commands relating to Habitat runtime config
    file        Commands relating to Habitat files
    help        Prints this message or the help of the given subcommand(s)
    origin      Commands relating to Habitat origin keys
    pkg         Commands relating to Habitat packages
    ring        Commands relating to Habitat rings
    service     Commands relating to Habitat services
    studio      Commands relating to Habitat Studios
    sup         Commands relating to the Habitat Supervisor
    user        Commands relating to Habitat users
ALIASES:
    apply       Alias for: 'config apply'
    install     Alias for: 'pkg install'
    start       Alias for: 'sup start'

> hab studio -t busybox enter
∵ Package for core/hab-studio not found, installing
» Installing core/hab-studio
↓ Downloading core/hab-studio/0.5.0/20160524185743
    2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s  ✓ Installed core/hab-studio/0.5.0/20160524185743
★ Install of core/hab-studio complete with 1 packages installed.
   hab-studio: Creating Studio at /hab/studios/src (busybox)
   hab-studio: Entering Studio at /hab/studios/src (busybox)

[#][busybox:/src:0]# exit

> hab stu rm
   hab-studio: Destroying Studio at /hab/studios/src (busybox)
```

Signed-off-by: Fletcher Nichol <[email protected]>

Pull request: #567
Approved by: reset
raskchanky pushed a commit that referenced this pull request Apr 16, 2019
This change introduces a new top-level subcommand noun: `studio`. The
implementation logic is virtually identical to the `hab sup` subcommand,
meaning that the `core/hab-studio` package is installed if not present
and then directly invoked via an `exec(1)` syscall.

```sh
> hab
hab 0.5.0

Authors: The Habitat Maintainers <[email protected]>

"A Habitat is the natural environment for your services" - Alan Turing

USAGE:
    hab [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    artifact    Commands relating to Habitat artifacts
    config      Commands relating to Habitat runtime config
    file        Commands relating to Habitat files
    help        Prints this message or the help of the given subcommand(s)
    origin      Commands relating to Habitat origin keys
    pkg         Commands relating to Habitat packages
    ring        Commands relating to Habitat rings
    service     Commands relating to Habitat services
    studio      Commands relating to Habitat Studios
    sup         Commands relating to the Habitat Supervisor
    user        Commands relating to Habitat users
ALIASES:
    apply       Alias for: 'config apply'
    install     Alias for: 'pkg install'
    start       Alias for: 'sup start'

> hab studio -t busybox enter
∵ Package for core/hab-studio not found, installing
» Installing core/hab-studio
↓ Downloading core/hab-studio/0.5.0/20160524185743
    2.52 MB / 2.52 MB / [==================================================================================================================================================================================================] 100.00 % 49.32 MB/s  ✓ Installed core/hab-studio/0.5.0/20160524185743
★ Install of core/hab-studio complete with 1 packages installed.
   hab-studio: Creating Studio at /hab/studios/src (busybox)
   hab-studio: Entering Studio at /hab/studios/src (busybox)

[#][busybox:/src:0]# exit

> hab stu rm
   hab-studio: Destroying Studio at /hab/studios/src (busybox)
```

Signed-off-by: Fletcher Nichol <[email protected]>

Pull request: #567
Approved by: reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants