aptible / aptible-cli Goto Github PK
View Code? Open in Web Editor NEWCommand line interface to Aptible
License: MIT License
Command line interface to Aptible
License: MIT License
An extension to tunnel
which will support dumping databases to file. Initially, it need only support PostgreSQL (via SQL-based pg_dump
).
Check out operation with id "2723", it's a failed db:clone attempt at 2014-08-05 21:42:47 UTC. I don't see anything relevant in our papertrail logs, not sure how to proceed.
source = database_from_handle('hint-api-staging')
=> #<Aptible::Api::Database:0x80d94b14 @root="https://api.aptible.com" @href="https://api.aptible.com/databases/10" @loaded=true @namespace="Aptible::Api" ...>
op = source.create_operation(type: 'clone', handle: 'hint-api-aptible-pg')
=> #<Aptible::Api::Operation:0x8098f168 @root="https://api.aptible.com" @href="https://api.aptible.com/operations/2723" @loaded=true @namespace="Aptible::Api" ...>
op.status
=> "queued"
op.get
=> #<Aptible::Api::Operation:0x8098f168 @root="https://api.aptible.com" @href="https://api.aptible.com/operations/2723" @loaded=true @namespace="Aptible::Api" ...>
op.status
=> "failed"
command ./scripts/aptible_deploy.sh $BRANCH_APP_NAME took more than 3 minutes since last output
Note that this really applies to Primetime. We can work around the issue by printing output every 10 seconds from primetime-shell.
$ aptible ssh # ...
(8ミ | INFO: Fetching latest app image...
(8ミ | ERROR: "\xE2" from ASCII-8BIT to UTF-8
Probably need to force a later version of Thor
$ bundle exec aptible db:dump <db-name>
(8ミ | INFO: Connecting to database...
2014/08/05 20:28:29 socat[1012] E bind(3, {AF=2 0.0.0.0:8080}, 16): Address already in use
db:create
should take a database name and should support the following optional attributes:
source
: source dump filetype
(default: postgresql
)size
(default: 10
)There is no way to remove a VHost that eg has been erroneously added to a service that does not require one. As a consequence every deployment/scaling execution unnecessarily creates an NGiNX proxy, updates ELB etc.
Contemplating the usefulness of this feature, and whether customers have pros/cons that they've experienced with heroku logs
that we can learn from...
Stores a token in ~/.aptible/tokens
apps:create
should create a new app. It should take an optional account
attribute, but default to the user's only account, if they only have one.
➜ aptible-api-ruby git:(master) aptible config
/Users/frank/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/shellwords.rb:75:in `shellescape': undefined method `empty?' for true:TrueClass (NoMethodError)
--app
required even in app directory
$ aptible tunnel <HOST> <PORT>
Authenticating and creating tunnel...
Tunnel to <HOST>:<PORT> created and available at localhost:45455.
Set up a Docker registry user and password for the account.
Each deploy, run:
aptible apps:deploy --app <app-handle> registry-name/repo-name:tag
Really a Primetime issue, but this is becoming such a pain for onboarding that we really need to be able to stream logs down from Sweetness back to the Primetime agent.
For Heroku parity.
This will automagically populate the app's config, a la heroku addons
Confirmed on Thor 0.14.6:
/Users/frank/Code/aptible/aptible-cli/lib/aptible/cli/subcommands/apps.rb:11:in `block in included': undefined method `option' for Aptible::CLI::Agent:Class (NoMethodError)
from /Users/frank/Code/aptible/aptible-cli/lib/aptible/cli/subcommands/apps.rb:6:in `class_eval'
Even aptible help
takes forever — what's happening?
bundle exec aptible db:clone
undefined local variable or method `database' for #Aptible::CLI::Agent:0x000001016b38a0 (NameError)
aptible apps
should list all extant apps, a la heroku apps
.
(8ミ | INFO: Fetching latest app image...
This interferes with, e.g., redirecting output from a remote command to local file.
List all databases, with URLs.
{ "https://auth.aptible.com":"access_token" }
... missing stub somewhere.
Like db:create, but requires a source handle and destination handle. This obviates adding --source
to db:create.
/Users/frank/.gem/ruby/2.0.0/gems/aptible-api-0.4.3/lib/aptible/api/resource.rb:25:in `all': undefined method `apps' for nil:NilClass (NoMethodError)
Should be able to create an app from the command line.
cc: @bwest87
gem install aptible-cli
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: aptible-auth requires oauth2-aptible (>= 0)
Different than restart
in that a new image will be built from the same git_ref
as the current image. This is useful in cases where the code has not changed, but an upstream Dockerfile dependency has been updated (as in the case of Heartbleed).
Retrieves a single environment variable, and prints it out (shell-escaped) with no other output
This warning comes up after each BroadwayJoe deploy.
A fix in the meantime is to run:
ssh-keygen -R [<customer-stackname>.ssh.aptible.com]:42022
aptible db:deprovision HANDLE
aptible apps:deprovision HANDLE
Add confirmation at end.
A user can run an arbitrary command against the current_image
of their app, with its current_configuration
. This requires the implementation of BroadwayJoe, integrated with Megatron.
This is a small iteration on top of aptible tunnel
, allowing an end user to dump a database to their local computer.
cc: @dleve123
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.