在公有云上尝试PCF

Pivotal网络服务是Pivotal应用PCF的实际用例,此15分钟的教程将带您学习如何在Pivotal网络服务上部署和运行示例应用程序。

Connect a Database

PCF enables administrators to provide a variety of services on the platform that can easily be consumed by applications.

List the available ElephantSQL plans:

cf marketplace -s elephantsql

Create a service instance with the free plan:

cf create-service elephantsql turtle cf-demo-db

Bind the newly created service to the app:

cf bind-service cf-demo cf-demo-db

Once a service is bound to an app, environment variables are stored that allow the app to connect to the service after a push, restage, or restart command.

Restart the app:

cf restage cf-demo

Verify the new service is bound to the app:

cf services
Questions?