30. $ cd myapp
myapp$ vmc push whatsnext
Would you like to deploy from the current directory? [Yn]: Y
Application Deployed URL: 'whatsnext.cloudfoundry.com'?
Detected a Java SpringSource Spring Application, is this correct?
[Yn]:
Memory Reservation [Default:512M] (64M, 128M, 256M, 512M or 1G)
Creating Application: OK
Would you like to bind any services to 'whatsnext'? [yN]: N
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (8K): OK
Push Status: OK
Starting Application: OK
myapp$
31.
32. $ vmc instances whatsnext
+-------+---------+--------------------+
| Index | State | Start Time |
+-------+---------+--------------------+
| 0 | RUNNING | 05/23/2011 03:36PM |
+-------+---------+--------------------+
$
33. $ vmc instances whatsnext
+-------+---------+--------------------+
| Index | State | Start Time |
+-------+---------+--------------------+
| 0 | RUNNING | 05/23/2011 03:36PM |
+-------+---------+--------------------+
$ vmc instances whatsnext 3
Scaling Application instances up to 3: OK
$
34. $ vmc instances whatsnext
+-------+---------+--------------------+
| Index | State | Start Time |
+-------+---------+--------------------+
| 0 | RUNNING | 05/23/2011 03:36PM |
+-------+---------+--------------------+
$ vmc instances whatsnext 3
Scaling Application instances up to 3: OK
$ vmc instances whatsnext
35. $ vmc instances whatsnext 3
Scaling Application instances up to 3: OK
$ vmc instances whatsnext
+-------+---------+--------------------+
| Index | State | Start Time |
+-------+---------+--------------------+
| 0 | RUNNING | 05/23/2011 03:36PM |
| 1 | RUNNING | 05/23/2011 03:46PM |
| 2 | RUNNING | 05/23/2011 03:46PM |
+-------+---------+--------------------+
$
37. Applica;on
Concepts
All
of
the
code,
libraries,
and,
data
that
are
needed
in
my
code
order
to
run
my
code
on
a
system
supplied
stack
Instances
make
my
applica;on
scale.
The
more
instances
the
more
load
the
app
can
handle
My
app
is
URL
addressable
and
can
have
mul;ple
URLs,
http://www.foo
some
clouds
allow
custom
domains
Services
are
used
to
extend
an
applica;on
with
higher
level
func;ons
like
a
KV
store
or
email
gateway
Applica;on
Tools
$ vmc update myapp
$ vmc apps
vmc
(command
line
tool)
and
STS
plugin
(IDE)
are
the
primary
tools
used
by
developers
$ vm
51. design
for
scale
app app sessions
msg fabric
app data
app app app ref data
app
data
fabric
database
52. cloud
foundry
example
system
load
balancer
elas;c
pool
redis
mysql
front_end
front_end
rabbitMQ
elas;c
pool
mongodb
back_end
53. # create the front end and backend apps
# front end is small but multi-‐instance
vmc push fe –instances 8 –mem 64M –path ../fe_code
vmc push be –instances 2 –mem 256M –path ../be_code
# create the services and bind per spec
vmc create-‐service mysql –name mysql –bind fe
vmc create-‐service mongodb –name mongo –bind be
vmc create-‐service rabbit –name rabbit –bind fe
vmc create-‐service redis –name redis –bind fe
vmc bind-‐service redis be
vmc bind-‐service rabbit be
# to perform an update of code
vmc update fe –path ../new_fe_code
vmc update be –path ../new_be_code