This is a Service Broker for Huawei Cloud. Currently it includes the following services support:
- Distributed Cache Service (DCS)
- Distributed Message Service (DMS)
- Object Storage Service (OBS)
- Relational Database Service (RDS)
You'll need a few prerequisites before you are getting started.
- Setup a MySQL Server and make sure that the database can be accessed by service broker
- Login in MySQL with your account and password
- Create database instance by running the following command
CREATE DATABASE broker;
- Create database user by running the following command
CREATE USER 'username'@'%' IDENTIFIED BY 'password';
- Grant privileges to the user by running the following command
GRANT ALL PRIVILEGES ON broker.* TO 'username'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;
- Make sure MySQL can be connected remotely
vi /etc/mysql/mysql.conf.d/mysqld.cnf #bind-address = 127.0.0.1
- Restart MySQL service
The information of database instance will be used in the following Installation.
Download the configuration file and modify the configuration file to include your own configurations. See configuration.md for instructions.
Using the standard go install
(you must have Go already installed in your local machine):
$ go install github.com/huaweicloud/huaweicloud-service-broker
$ huaweicloud-service-broker -config=config.json -port=3000
Application Developers can start to test the services locally. The lifecycle.sh can guide you to test by scripts.
The broker can be deployed to an already existing Cloud Foundry installation:
$ git clone https://github.com/huaweicloud/huaweicloud-service-broker.git
$ cd huaweicloud-service-broker
Modify the configuration file to include your own configurations. See configuration.md for instructions.
Then you can push the broker to your Cloud Foundry environment:
$ cf push huaweicloud-service-broker
Register the broker within your Cloud Foundry installation. For example:
$ cf create-service-broker huaweicloud-service-broker username password https://huaweicloud-service-broker.example.com
Make sure that the service broker is registered successfully:
$ cf service-brokers
Display access to service:
$ cf service-access
Make Services and Plans public. For example, enable rds-mysql service:
$ cf enable-service-access rds-mysql
Application Developers can start to consume the services using the standard CF CLI commands. See usage.md for instructions.
In the spirit of free software, everyone is encouraged to help improve this project.
Here are some ways you can contribute:
- by using prerelease versions or master branch
- by reporting bugs
- by suggesting new features
- by writing or editing documentation
- by writing specifications
- by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
- by refactoring code
- by closing issues
- by reviewing patches
We use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. You can indicate support for an existing issue by voting it up. When submitting a bug report, please include a Gist that includes a stack trace and any details that may be necessary to reproduce the bug, including your Golang version and operating system. Ideally, a bug report should include a pull request with failing specs.
- Fork the project
- Create a topic branch
- Implement your feature or bug fix
- Commit and push your changes
- Submit a pull request
huaweicloud-service-broker is under the Apache 2.0 license. See the LICENSE file for details.