Github action to setup a YugabyteDB database
- Docker yugabytedb image tag. For available image tags please follow https://hub.docker.com/r/yugabytedb/yugabyte
- Default value:
latest
- Optional
- YB Master UI Port
- Default value:
7000
- Optional
- YB Tserver UI Port
- Default value:
9000
- Optional
- YSQL API Port
- Default value:
5433
- Optional
- YCQL API Port
- Default value:
9042
- Optional
- YSQL User
- Optional
- YSQL Password, Setting this will enable the authentication mode.
- Optional
- YSQL DB
- Optional
- YCQL User, Setting this will enable the authentication mode.
- Optional
- YCQL Password, Setting this will enable the authentication mode.
- Optional
- YCQL Keyspace
- Optional
Note: For more information about different combinations and their effects of authentication related inputs, please take a look at https://docs.yugabyte.com/latest/reference/configuration/yugabyted/#environment-variables
container_id
- Docker container IDyb_master_ui_port
- YB Master UI portyb_tserver_ui_port
- YB Tserver UI portysql_port
- YSQL API Portycql_port
- YCQL API Port
- Default with no custom credentials:
- name: Setup YugabyteDB cluster
uses: yugabyte/yugabyte-db-action@master
id: server
# Sample usage:
- name: Test YSQL API
run: |
docker run --network host --rm yugabytedb/yugabyte-client:latest ysqlsh -h localhost -p "${{ steps.server.outputs.ysql_port }}" \
-c "CREATE TABLE foo(id int primary key); INSERT INTO foo SELECT * FROM generate_series(1,10);"
- name: Test YCQL API
run: |
docker run --network host --rm yugabytedb/yugabyte-client:latest ycqlsh localhost "${{ steps.server.outputs.ycql_port }}" \
--execute 'create keyspace foo; create table foo.bar(id int primary key); insert into foo.bar (id) values (1);'
- name: Test YB Master UI
run: curl --head "http://localhost:${{ steps.server.outputs.yb_master_ui_port }}"
- name: Test YB Tserver UI
run: curl --head "http://localhost:${{ steps.server.outputs.yb_tserver_ui_port }}"
- Customized connection settings:
- name: Setup YugabyteDB cluster
uses: yugabyte/yugabyte-db-action@master
with:
yb_image_tag: 2.2.0.0-b80
yb_master_ui_port: 7000
yb_tserver_ui_port: 9000
ysql_port: 5433
ycql_port: 9042
# Sample usage:
- name: Test YB Tserver UI
run: curl --head "http://localhost:9000"
- Custom Credentials
- name: Setup YugabyteDB cluster
uses: yugabyte/yugabyte-db-action@master
with:
yb_image_tag: 2.3.2.0-b37
ysql_user: testsqluser
ysql_password: testsqlpass
ysql_db: testdb
ycql_user: testcqluser
ycql_password: testcqlpass
ycql_keyspace: testks
- name: Test YSQL API
run: |
docker run --network host -e PGPASSWORD=testsqlpass --rm yugabytedb/yugabyte-client:latest ysqlsh -h localhost -U testsqluser -d testdb -p "${{ steps.server.outputs.ysql_port }}" \
-c "CREATE TABLE foo(id int primary key); INSERT INTO foo SELECT * FROM generate_series(1,10);"
- name: Test YCQL API
run: |
docker run --network host --rm yugabytedb/yugabyte-client:latest ycqlsh localhost -u testcqluser -p testcqlpass "${{ steps.server.outputs.ycql_port }}" \
--execute 'create keyspace foo; create table foo.bar(id int primary key); insert into foo.bar (id) values (1);'