Git Product home page Git Product logo

Comments (7)

misterbisson avatar misterbisson commented on May 24, 2024 1

It would be very helpful to be able to do the following to set up the Docker environment vars to use sdc-docker:

eval $(triton docker-env)

That would set the local environment based on the user's current active profile. Users can then switch back to a local docker using standard Docker Machine:

eval $(docker-machine env lappy)

This is desirable to reduce friction in initial Docker setup for Triton and when switching back and forth.

The triton syntax above intentionally omits the option of configuring the Docker environment to connect to a different data center/profile. This is to eliminate confusion that results from using docker and triton in parallel, but unintentionally connected to different DCs. @tgross and I have started to protect against that using checks like those in https://github.com/tgross/triton-touchbase/blob/master/start.sh#L55-L75, but it would be best to make the tools assume they're connecting using the same profile from the start.

from node-triton.

trentm avatar trentm commented on May 24, 2024 1

^^^ added all but step #4 of the proposal. Given that I'm going away for a week, I don't want to push a new release until I'm back (in case this breaks people). So we'll let it soak a bit.

from node-triton.

trentm avatar trentm commented on May 24, 2024

@misterbisson +1. Definitely room to re-imagine sdc-docker-setup.sh using triton. triton docker env or triton docker-env (with support for triton's profiles) would be fairly straightforward I think. It could do the cert setup on first run and cache the necessary data.

I also have a triton setup dream, BTW.

from node-triton.

trentm avatar trentm commented on May 24, 2024

one example of this working: https://gist.github.com/trentm/726d0e610067bf59fec5

from node-triton.

trentm avatar trentm commented on May 24, 2024

Proposal:

Getting triton to help setup for Docker usage.
A.k.a. "sdc-docker-setup.sh sucks".

First time user

  1. In the browser/email, create an account with Joyent:

    https://my.joyent.com
    

    Note that this has a number of redirects (and needing to find the "Sign up"
    link) that make it more jarring than it needs to be. Having a nice
    link for signing up would be nice.

    ... presuming they are fine creating an account and being led through
    adding an SSH key
    .

  2. In the shell, install triton and setup for docker usage

    # install node/npm
    npm install -g triton
    # optionally install triton bash completion
    triton profile create   # defaults to us-sw-1
    

    Perhaps we could setup for docker during triton profile create. We already
    hit CloudAPI anyway. If CloudAPI ListServices has "docker" then we do the
    docker setup as well.

  3. Use docker:

    eval "$(triton env)"
    docker run joyent/hello-world
    

    We already have triton env to set SDC_ and TRITON_ envvars. We could
    add the DOCKER_ envvars as well.

  4. Optionally: Use triton docker to run docker without having to change
    one's environment.

    triton docker run joyent/hello-world
    

Users with triton profiles already that now want Docker setup for them

Users like me. :)

triton profile docker-setup

This would do the Docker-part of the profile setup for the current profile.
Might like to do that for another profile:

triton profile docker-setup east3b

from node-triton.

trentm avatar trentm commented on May 24, 2024

version 4.9.0 published. This leaves:

  1. triton docker ... nicety -> #105
  2. deprecating sdc-docker-setup.sh and relevant docs (https://docs.joyent.com/private-cloud/install/client-setup https://docs.joyent.com/private-cloud/hybrid-cloud) -> https://smartos.org/bugview/DOCKER-766

from node-triton.

misterbisson avatar misterbisson commented on May 24, 2024

The biggest update is in https://docs.joyent.com/public-cloud/api-access/docker, but there are a lot of results for google: site:www.joyent.com/blog "sdc-docker-setup.sh" and google: "sdc-docker-setup.sh" -inurl:joyent.com/blog

from node-triton.

Related Issues (20)

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.