Code Monkey home page Code Monkey logo

duffle's Introduction

Duffle: The CNAB Installer

Build Status

Duffle is a command line tool that allows you to install and manage CNAB bundles. To learn more about about CNAB and duffle, check out the docs.

Getting Started

  1. Ensure you're running the latest version of Go (1.11+) by running $ go version

    $ go version
    go version go1.11 darwin/amd64
  2. Clone this repo:

    $ cd $GOPATH/src/github.com/deislabs/
    $ git clone [email protected]:deislabs/duffle.git
    $ cd duffle
  3. Vendor dependencies and build the duffle binary:

    $ make bootstrap build
  4. Run the command to set duffle up on your machine:

    $ duffle init
    The following new directories will be created:
    /Users/janedoe/.duffle
    /Users/janedoe/.duffle/logs
    /Users/janedoe/.duffle/plugins
    /Users/janedoe/.duffle/repositories
    /Users/janedoe/.duffle/claims
    /Users/janedoe/.duffle/credentials
    ==> Installing default repositories...
    ==> repo added in 1.096263107s
  5. Build and install your first bundle:

    $ duffle build ./examples/helloworld/
    Step 1/5 : FROM alpine:latest
    ---> 196d12cf6ab1
    Step 2/5 : RUN apk add -u bash
    ---> Using cache
    ---> 54b3a85c5c2e
    Step 3/5 : COPY Dockerfile /cnab/Dockerfile
    ---> Using cache
    ---> cd6f4ff8d83d
    Step 4/5 : COPY app /cnab/app
    ---> 38a482447ffd
    Step 5/5 : CMD ["/cnab/app/run"]
    ---> Running in 8b22055f0a37
    ---> e5c795c2a1f4
    Successfully built e5c795c2a1f4
    Successfully tagged deislabs/helloworld-cnab:64dfc7c4d825fe87506dbaba6ab038eafe2a486d
    ==> Successfully built bundle helloworld:0.1.0
    
  6. Check that it was built:

    $ duffle bundle list
    NAME            VERSION DIGEST                                          SIGNED?
    helloworld      0.1.0   b2747e5c36369f4c102f4f879caa94e607e5db7e        true
  7. Now run it:

    $ duffle credentials generate helloworld-creds helloworld:0.1.0
    $ duffle install helloworld-demo -c helloworld-creds helloworld:0.1.0
    Executing install action...
    hello world
    Install action
    Action install complete for helloworld-demo
  8. Clean up:

    $ duffle uninstall helloworld-demo
    Executing uninstall action...
    hello world
    uninstall action
    Action uninstall complete for helloworld-demo

    Notes:

    • Learn more about what a bundle is and its components here.
    • Get a feel for what CNAB bundles look like by referencing the bundles repo on github.

Debugging using VS Code

For instructions on using VS Code to debug the Duffle binary, see the debugging document.

duffle's People

Contributors

adamreese avatar carolynvs avatar carolynvs-msft avatar chris-crone avatar fibonacci1729 avatar itowlson avatar jeremyrickard avatar johnmccabe avatar radu-matei avatar simonferquel avatar tariq1890 avatar technosophos avatar vdice avatar

Watchers

 avatar  avatar

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.