Pivotal/Cloud Foundry/CLI

From r00tedvw.com wiki
(Difference between revisions)
Jump to: navigation, search
Line 65: Line 65:
 
bind the service to the app
 
bind the service to the app
 
  <nowiki> ~$ cf bind-service <app_name> <service_name></nowiki>
 
  <nowiki> ~$ cf bind-service <app_name> <service_name></nowiki>
 +
 +
==cf scale==
 +
scale the number of instances to improve app performance such as user load and concurrent requests.
 +
<nowiki>~$ cf scale spring-music -i <number of instances></nowiki>

Revision as of 16:58, 15 May 2018

Cloud Foundry | Cloud Foundry CLI

Contents

Installing CF CLI

Mac OSX (High Sierra)

First start by installing homebrew package manager

~$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Tap the Cloud Foundry repo and install CF CLI

~$ brew tap cloudfoundry/tap
~$ brew install cf-cli

For good measure you should install git if you have not.

~$ brew install git

Quick Reference CF CLI

CLI Reference

cf-login

Sign into PWS (Pivotal Web Services).
Man file

~$ cf login -u username -o org -s space -a api.run.pivotal.io

To logout it is as simple as

 ~$ cf logout

cf config

Set configuration variables such as language, timeouts, color, etc.
Man file | Localize

~$ $ cf config --locale YOUR_LANGUAGE
Language Examples:
English (US): en-US
German: de-DE
Spanish: es-ES

cf apps

Show all apps in your authenticated instance with their state and some details.

 ~$ cf apps

cf app

Show expanded details on an app

~$ cf app <app_name>

cf restart

restart an app

~$ cf restart <app_name>

cf restage

Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.)

~$ cf restage <app_name>

cf services

list all service instances

~$ cf services

cf logs

Show logs from an app either as a snapshot or live stream

Snapshot: ~$ cf logs <app_name> --recent
Stream: ~$ cf logs <app_name>

cf-marketplace

View available elephantsql plans.

~$ cf marketplace -s elephantsql

cf create-service

create a new service, such as a elephantsql instance

~$ cf create-service elephantsql turtle <db_name>

cf bind-service

bind the service to the app

 ~$ cf bind-service <app_name> <service_name>

cf scale

scale the number of instances to improve app performance such as user load and concurrent requests.

~$ cf scale spring-music -i <number of instances>
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Open Source Products
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
MagicMirror
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
Politics
Volkswagen
Covid
NCDMV
Toolbox