简体   繁体   English

Cloud Foundry中的数据库实例是什么?

[英]What is database instance in cloud foundry?

After running below command, 在执行以下命令后,

     $ cf create-service-key mysql-db-service MY-KEY

There is a file created with name MY-KEY (shown below) that has key name (database instance) with value service-instance-db 创建了一个名称为MY-KEY (如下所示)的文件,该文件的键name (数据库实例)的值为service-instance-db

{
  "hostname": "w-ns27y31.q-g1444.bosh",
  "jdbcUrl": "jdbc:mysql://w-ns27y31.q-g1444.bosh:3306/service_instance_db?user=ccd64a5aa128fffffffffff26d80&password=eddddddd50g&useSSL=false",
  "name": "service_instance_db",
  "password": "el99ffffffffff",
  "port": 3306,
  "uri": "mysql://ccd64a5aa1284dadab01271693d26d80:el9905261y23b50g@w-ns27y31.q-g1444.bosh:3306/service_instance_db?reconnect=true",
  "username": "ccd64ddddddddd271693d26d80"
}

If I create a more than one service key file, then hostname & name remains same in each service key file, but username and password changes 如果我创建多个服务密钥文件,则每个服务密钥文件中的hostnamename相同,但用户名和密码会更改


In database world, we create database instance with syntax: create DATABASE statement 在数据库世界中,我们使用以下语法创建数据库实例create DATABASE语句

And an application runs on that database instance say instance1 然后在该数据库实例上运行一个应用程序,例如instance1

For another new different application, we create another database instance say instance2 对于另一个新的不同应用程序,我们创建另一个数据库实例,例如instance2


1) Is value service-instance-db for key name a database instance? 1)关键字name的值service-instance-db是数据库实例吗? In service key file MY-KEY 在服务密钥文件MY-KEY

2) if yes, then we create a separate service key file on mysql-db-service app for each new db application on cloud foundry, but I see same database instance name service-instance-db in service key file. 2)如果是,那么我们在mysql-db-service应用程序上为Cloud Foundry上的每个新数据库应用程序创建一个单独的服务密钥文件,但是我在服务密钥文件中看到相同的数据库实例名称service-instance-db How do I understand this? 我怎么理解的?

1) Is value some-service-db for key name a database instance? 1)密钥名称的值some-service-db是否为数据库实例? In service key file MY-KEY 在服务密钥文件MY-KEY中

It honestly depends on the service broker how this is handled. 老实说,这取决于服务代理如何处理。 Generally, running cf create-service will create an instance of the service and running cf bind-service or cf create-service-key will create a set of credentials you can use to access the service. 通常,运行cf create-service将创建cf create-service的实例,运行cf bind-servicecf create-service-key将创建可用于访问服务的一组凭据。

It depends on the broker though as to what exactly happens. 但是,到底发生了什么,取决于经纪人。 Running cf create-service can result in anything from a partition in a shared multi-tenant service to a set of dedicated VMs running a cluster of your service. 运行cf create-service可能导致任何事情,从共享多租户服务中的分区到运行服务集群的一组专用VM。

2) if yes, then we create a separate service key file on mysql-db-service app for each new db application on cloud foundry, but I see same database instance name some-service-db in service key file. 2)如果是,那么我们在mysql-db-service应用程序上为Cloud Foundry上的每个新数据库应用程序创建一个单独的服务密钥文件,但是我在服务密钥文件中看到相同的数据库实例名称some-service-db。 How do I understand this? 我怎么理解的?

In most cases, the service key is just a new, likely unique, set of credentials for accessing the service instance. 在大多数情况下,服务密钥只是用于访问服务实例的一组新的(可能是唯一的)凭据。 You need to look at the docs for your service broker to see exactly how this is handled though. 您需要查看服务代理的文档,以确切了解如何处理。

Hope that helps! 希望有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Java连接到Cloud Foundry MySQL数据库连接? - How to connect to a Cloud Foundry MySQL database connection in Java? 在Cloud Foundry中创建数据库架构的常见做法是什么? - What is the common practice to create db schema in Cloud Foundry? Cloud Foundry + JPA + Spring + EntityManager - Cloud Foundry + JPA + Spring + EntityManager 在云中开发数据库需要什么? - What's needed to develop a database in the cloud? 在Rackspace Cloud数据库实例中创建用户时的主机参数 - Host Parameter While Creating a User in Rackspace Cloud Database Instance 云/托管数据库/数据存储服务以替换本地SQL Server实例 - Cloud/hosted database/datastore services to replace local SQL Server instance 云计算(特别是chrome os)的数据库管理有哪些选择? - What are options for database management for cloud computing (chrome os specifically)? 使用自托管与托管云数据库的优缺点是什么? - What are the pros and cons of using a self hosted vs a managed cloud database? 在单个SQL Server实例中具有多个数据库排序规则的问题是什么? - What are the issues of having multiple database collations in single SQL Server instance? 您可以使用Microsoft SQL Server Management Studio Express管理Google Cloud SQL数据库实例吗? - Can you use Microsoft SQL Server Management Studio Express to manage a Google Cloud SQL database instance?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM