Comments (7)
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.
^^^ 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.
@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.
one example of this working: https://gist.github.com/trentm/726d0e610067bf59fec5
from node-triton.
Proposal:
Getting triton
to help setup for Docker usage.
A.k.a. "sdc-docker-setup.sh sucks".
First time user
-
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. -
In the shell, install
triton
and setup fordocker
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. -
Use
docker
:eval "$(triton env)" docker run joyent/hello-world
We already have
triton env
to setSDC_
andTRITON_
envvars. We could
add theDOCKER_
envvars as well. -
Optionally: Use
triton docker
to rundocker
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.
version 4.9.0 published. This leaves:
triton docker ...
nicety -> #105- 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.
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)
- `triton rbac role[s]` should support new role API HOT 1
- Un-hide --act-as option and add environment var HOT 1
- v7.5.0 HOT 1
- triton inst migration finalize: error: not a valid migration action HOT 2
- Want Triton image update / tag HOT 1
- fs.unlink() requires a callback HOT 9
- node-triton fails to resolve host when a CNAME HOT 1
- triton volume list and triton volume sizes should agree on a unit HOT 1
- Honor the XDG directory conventions HOT 1
- `triton profile` should generate certs for cmon
- triton rbac commands generate os.tmpDir deprecation warning HOT 1
- Unhide volumes HOT 1
- Wrong CLI_CONFIG_DIR when XDG_CONFIG_HOME is set HOT 1
- want act-as support for "triton profile docker-setup" and "triton profile cmon-certgen" HOT 1
- cmon-certgen should generate an example prometheus.yml HOT 1
- want --primary argument to "triton inst nic create" HOT 1
- AssertionError in keyring.js caused by OpenSSL 3 HOT 4
- BadDigestError: Content-MD5 when body has non-ascii characters HOT 4
- want cloud-config syntactic sugar
- Want npm lockfile HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-triton.