Cloud: Trabalhando com o cliente CLI do Cloud Foundry para gerenciar o IBM Bluemix

From Wiki
Revision as of 20:29, 29 May 2017 by Ebasso (talk | contribs) (Criou a página com "Vamos utilizar a inteface de linha de comando (CLI) do Cloud Foundry para gerenciar o IBM Blumix = Usando a CLI = == Efetuando o Login == cf login [-a API_URL] [-u USERN...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Vamos utilizar a inteface de linha de comando (CLI) do Cloud Foundry para gerenciar o IBM Blumix

Usando a CLI

Efetuando o Login

cf login [-a API_URL] [-u USERNAME] [-p PASSWORD] [-o ORG] [-s SPACE]

API_URL is the API endpoint of the region that you want to log in to.
USERNAME is the user.
PASSWORD is the specified user’s password.
ORG is the organization name.
SPACE is the space name.

Comando;

1) Abra um janela de terminal e execute o comando

cf login

para fazer login

2) Informe os dados

API endpoint> https://api.ng.bluemix.net

Email> ebasso@<COMPANY>.com

Password>
Authenticating...
OK

Targeted org ebasso

Targeted space dev

O resultado sera

API endpoint:   https://api.ng.bluemix.net (API version: 2.54.0)
User:           ebasso@<COMPANY>.com
Org:            ebasso
Space:          dev


Fazendo o deploy da aplicação

cf push APP [-b URL] [-c COMMAND] [-d DOMAIN] [-i NUM_INSTANCES] [-m MEMORY] [-n HOST] [-p PATH] [-s STACK] [--no-hostname] [--no-route] [--no-start]

APP is the application name.

Pegando uma aplicação do GitHub e subindo para o bluemix

cf push {$APP_NAME} -b {$GIT_REPO_URL}

Exemplo:

cf push timeticker20170412 -b https://github.com/spiegela/cf-buildpack-erlang

O Resultado:

Creating app timeticker20170412 in org ebasso / space dev as [email protected]...
OK

Creating route timeticker20170412.mybluemix.net...
OK

Binding timeticker20170412.mybluemix.net to timeticker20170412...
OK

basta acessar o endereço http://timeticker20170412.mybluemix.net


Ver também