[英]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 如果我创建多个服务密钥文件,则每个服务密钥文件中的
hostname
和name
相同,但用户名和密码会更改
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-service
或cf 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.