diff --git a/build.md b/build.md index 991969b..2a923f4 100644 --- a/build.md +++ b/build.md @@ -15,96 +15,149 @@ next_string: # Build a trial environment Describes how to build an environment for **K2HDKC DBaaS with Trove** (Database as a Service for K2HDKC) that works with [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove). -This **K2HDKC DBaaS with Trove** is a system that incorporates [K2HDKC](https://k2hdkc.antpick.ax/) as a distributed KVS into one of [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) Databases. +This **K2HDKC DBaaS with Trove** is a system that incorporates [K2HDKC](https://k2hdkc.antpick.ax/) as a distributed KVS into one of [Trove](https://wiki.openstack.org/wiki/Trove) Databases. ## Required systems To build the **K2HDKC DBaaS** system environment, [OpenStack](https://www.openstack.org/) must be running. -And you need to setup [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) system to that [OpenStack](https://www.openstack.org/) system. +And you need to setup [Trove](https://wiki.openstack.org/wiki/Trove) system to that [OpenStack](https://www.openstack.org/) system. The required systems are shown below. -### [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) system -You need an environment that prepares [OpenStack](https://www.openstack.org/) system and incorporates [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) into it. -And you must patch this [Trove](https://wiki.openstack.org/wiki/Trove) with **K2HDKC DBaaS** [repository](https://github.com/yahoojapan/k2hdkc_dbaas) code. -Then you need to create a `Trove guest OS image` with the **K2HDKC DBaaS** [repository](https://github.com/yahoojapan/k2hdkc_dbaas) script and register it in [OpenStack](https://www.openstack.org/) as the OS image for the **K2HDKC server node**. +### [Trove](https://wiki.openstack.org/wiki/Trove) system +You need an environment that prepares [OpenStack](https://www.openstack.org/) system and incorporates [Trove](https://wiki.openstack.org/wiki/Trove) into it. +And you must patch this [Trove](https://wiki.openstack.org/wiki/Trove) with **K2HDKC DBaaS Trove** [repository](https://github.com/yahoojapan/k2hdkc_dbaas_trove) code. +Then you need to create a `Trove guest OS image` with the **K2HDKC DBaaS Trove** [repository](https://github.com/yahoojapan/k2hdkc_dbaas_trove) script and register it in [OpenStack](https://www.openstack.org/) as the OS image for the **K2HDKC server node**. +And you need to create a `K2HDKC Trove Docker images` with the **K2HDKC DBaaS Trove** [repository](https://github.com/yahoojapan/k2hdkc_dbaas_trove) script and register it in Docker registory which is allowed to access. ### [K2HR3](https://k2hr3.antpick.ax/) system **K2HDKC DBaaS** works with the [K2HR3](https://k2hr3.antpick.ax/) system as a backend. Prepare this [K2HR3](https://k2hr3.antpick.ax/) system in a network accessible from [OpenStack](https://www.openstack.org/) components and instances(`Virtual Machine`). ### Environment conditions -We are testing **K2HDKC DBaaS** on [CentOS 8.2](https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2004). -And **K2HDKC DBaaS** uses OpenStack [Ussuri](https://docs.openstack.org/ussuri/). +We are testing **K2HDKC DBaaS Trove** on [RockyLinix 9.x](https://rockylinux.org/). +And **K2HDKC DBaaS Trove** uses OpenStack [stable/2024.1](https://docs.openstack.org/2024.1/index.html) or later. If you are using any other environment, it may not work. -If you find any problems, please send [Issue](https://github.com/yahoojapan/k2hdkc_dbaas/issues). +If you find any problems, please send [Issue](https://github.com/yahoojapan/k2hdkc_dbaas_trove/issues). ## Trial environment -**K2HDKC DBaaS** can easily build a trial environment by indirectly using OpenStack's [DevStack](https://docs.openstack.org/devstack/latest/) tool. -[Trove](https://wiki.openstack.org/wiki/Trove) is designed to use [DevStack](https://docs.openstack.org/devstack/latest/), so **K2HDKC DBaaS** can use [DevStack](https://docs.openstack.org/devstack/latest/) to build a trial environment. +**K2HDKC DBaaS Trove** allows you to easily build a trial environment using the tools provided by **K2HDKC DBaaS Trove** based on OpenStack's [DevStack](https://docs.openstack.org/devstack/latest/). +[Trove](https://wiki.openstack.org/wiki/Trove) is designed to use the [DevStack](https://docs.openstack.org/devstack/) that corresponds to its version, and **K2HDKC DBaaS Trove** also creates a trial environment with the corresponding version of [DevStack](https://docs.openstack.org/devstack/). -We provide a **patch** for incorporating **K2HDKC DBaaS** into [Trove](https://wiki.openstack.org/wiki/Trove) and a **shell script** for building a trial environment which has the [K2HR3](https://k2hr3.antpick.ax/) system for backend. +The tool provided by **K2HDKC DBaaS Trove** incorporates our code into [Trove](https://wiki.openstack.org/wiki/Trove) and builds the trial environment. +It also builds the [K2HR3](https://k2hr3.antpick.ax/indexja.html) backend system required for the trial environment. +This tool can also create and register the dedicated guest OS image and K2HDKC Trove Docker image required for the trial environment. ### Required systems for a trial environment -For **K2HDKC DBaaS** trial environment, prepare a host machine with a memory of about 16GB and a disk size of about 120GB. +For **K2HDKC DBaaS Trove** trial environment, prepare a host machine with a memory of about 16GB and a disk size of about 120GB. _Strictly speaking, probably it also works in a lower performance host environment._ To build a trial environment, please prepare an environment in which [DevStack](https://docs.openstack.org/devstack/latest/) operates. If the environment to be prepared is a `Virtual Machine` created with OpenStack, etc., refer to [Nested Virtualization](https://docs.openstack.org/devstack/latest/guides/devstack-with-nested-kvm.html) etc. to prepare the environment. ### Build a trial environment -You can build the **K2HDKC DBaaS** trial environment by following the steps below. +You can build the **K2HDKC DBaaS Trove** trial environment by following the steps below. -#### (1) Clone **K2HDKC DBaaS** repository +#### (1) Host settings for trial environment +Prepare the host environment for building the trial environment for **K2HDKC DBaaS Trove**. +Prepare for [DevStack](https://docs.openstack.org/devstack/latest/) to run. + +If the trial environment for **K2HDKC DBaaS Trove** requires a PROXY, set the `HTTP(S)_PROXY` or `NO_PROXY` environment variable before proceeding with the following steps. + +#### (2) Clone **K2HDKC DBaaS Trove** repository Prepare one host machine(or `Virtual Machine`) to build a trial environment. _Everything written as `` in the following explanation means this host._ -Clone **K2HDKC DBaaS** [repository](https://github.com/yahoojapan/k2hdkc_dbaas) to the host that builds the trial environment. +Clone **K2HDKC DBaaS Trove** [repository](https://github.com/yahoojapan/k2hdkc_dbaas_trove) to the host that builds the trial environment. ``` -$ git clone https://github.com/yahoojapan/k2hdkc_dbaas.git +$ git clone https://github.com/yahoojapan/k2hdkc_dbaas_trove.git ``` -#### (2) Host environment settings -In the host that builds the trial environment, the controller node of OpenStack including the Trove function is operated. -Prepare the host of the trial environment so that these processes can operate. -``` -$ cd k2hdkc_dbaas/utils -$ ./custom_devstack_setup_1.sh -``` -When the script execution is complete, the host machine will be restarted automatically. +#### (3) Run k2hdkcstack.sh +The [k2hdkcstack.sh](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hdkcstack.md) tool is a tool to build a trial environment for **K2HDKC DBaaS Trove**. +You can build a trial environment for **K2HDKC DBaaS Trove** by running only this tool. -#### (3) Build an OpenStack controller node -Start all OpenStack controller nodes including Trove which contains the **K2HDKC DBaaS** functionality. -During this process, a `Trove guest OS image` for **K2HDKC DBaaS** is created and automatically registered as an OS image in Trove and OpenStack. -``` -$ cd k2hdkc_dbaas/utils -$ sudo install -o stack -g stack *.sh -v /opt/stack -$ sudo su - stack -$ ./custom_devstack_setup_2.sh -``` -After the script completes successfully, all OpenStack controller nodes that incorporate Trove including **K2HDKC DBaaS** functionality are up. +Below is an example of initialization (cleanup) and construction using this tool. -You can verify all OpenStack controller node startup by accessing the Dashboard(which has a built-in Trove panel). +##### (3-1) Initialization (cleanup) +If the trial environment is already running, or if you want to discard the trial environment you created, perform this initialization (cleanup). ``` -URL: http:/// +$ cd buildutils +$ ./k2hdkcstack.sh clean -r -pr ``` -At this step, **K2HDKC DBaaS** will not work because we have not yet built the [K2HR3](https://k2hr3.antpick.ax/) system. -#### (4) Build [K2HR3](https://k2hr3.antpick.ax/) system -Finally, build the [K2HR3](https://k2hr3.antpick.ax/) system that is used as the backend for **K2HDKC DBaaS**. -[K2HR3](https://k2hr3.antpick.ax/) system is built to work in one instance(`Virtual Machine`) of OpenStack built above(3). +##### (3-2) Creating a trial environment +Use the following command to create a trial environment. ``` -$ sudo su - stack -$ ./k2hr3_pack_setup.sh +$ cd buildutils +$ ./k2hdkcstack.sh start --password password --without-docker-image ``` -This script will ask you for a hostname or IP address to access with a browser along the way. -If you want to use a value different from the displayed hostname or IP address, you can correct it with this confirmation. -After the script completes successfully, you can access the `K2HR3 Web Application` via the host machine that built the trial environment. +This execution will create an OpenStack + Trove environment that includes **K2HDKC DBaaS Trove**. +The [K2HR3](https://k2hr3.antpick.ax/indexja.html) backend system will also be created within this environment. +A guest OS image will also be created and registered to start the K2HDKC cluster (server node) using **K2HDKC DBaaS Trove**. + +This will create the necessary environment and components for **K2HDKC DBaaS Trove**. + +#### (4) Verification +If the trial environment is started successfully, the following will be displayed. ``` -URL: http://:28080/ +--------------------------------------------------------------------- +[TITLE] Summary : K2HDKC DBaaS Trove +--------------------------------------------------------------------- +[SUCCESS] Started devstack (2024-XX-XX-XX:XX:XX) + You can access the DevStack(OpenStack) console from the URL: + http://devstack.localhost/ + Initial administrator users log in with admin : ********. + + K2HDKC Trove docker image: .../k2hdkc-trove:1.0.2-alpine + K2HDKC Trove backup docker image: .../k2hdkc-trove-backup:1.0.2-alpine + +[SUCCESS] Finished k2hr3setup.sh process without error. (2024-XX-XX-XX:XX:XX) + Base host(openstack trove) : + K2HR3 System(instance name) : k2hdkc-dbaas-k2hr3 + APP local port : 28080 + API local port : 18080 + K2HR3 Web appliction : http://XX.XX.XX.XX:8080/ + K2HR3 REST API : http://XX.XX.XX.XX:18080/ ``` -#### (5) Verification -If you can successfully access the `Trove Dashboard` shown in (3) and the `K2HR3 Web Application` shown in (4), the trial environment has been **successfully built**. -How to use **K2HDKC DBaaS** will be explained in the next chapter. +To check the operation, access the `DevStack (OpenStack) console from the URL` and the `K2HR3 Web application` and check if you can log in. +When logging in, try using the username `admin`, `trove`, or `demo`. + +## Notes + +### Tools +The tools are located under the `buildutils` directory. +The purpose of each tool and a simple usage are explained below. + +#### k2hdkcstack.sh +This tool is intended to build a trial environment for **K2HDKC DBaaS Trove**. +This tool calls `k2hdkcdockerimage.sh` and `k2hr3setup.sh` at the same time as building, and also creates and registers the K2HDKC DBaaS Trove Docker image and builds the [K2HR3](https://k2hr3.antpick.ax/indexja.html) backend system. + +For tool options and usage, please refer to [here](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hdkcstack.md). + +#### k2hdkcdockerimage.sh +This is a tool to create and register K2HDKC DBaaS Trove Docker images. + +**K2HDKC DBaaS Trove** requires Docker images for the server nodes of the K2HDKC cluster and for the backup of those nodes. +This tool creates and registers these two Docker images (`k2hdkc-trove`, `k2hdkc-trove-backup`). +This tool is called from `k2hdkcstack.sh`. +You can also use it directly. + +For the options and usage of the tool, please see [here](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hdkcdockerimage.md). + +#### k2hr3setup.sh +This is a tool to build a minimal [K2HR3](https://k2hr3.antpick.ax/indexja.html) backend system for a trial environment. +This tool is intended to be called from `k2hdkcstack.sh`, so there is no need to use it directly. + +See [here](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hr3setup.md) for tool options and usage. + +### K2HDKC DBaaS Trove image +**K2HDKC DBaaS Trove** requires Docker images for the server nodes of the K2HDKC cluster and for backing up those nodes. + +We distribute these Docker images from [DockerHub](https://hub.docker.com/). +- [k2hdkc-trove](https://hub.docker.com/r/antpickax/k2hdkc-trove) +- [k2hdkc-trove-backup](https://hub.docker.com/r/antpickax/k2hdkc-trove-backup) +If you use this Docker image, you can skip creating and registering the Docker image by specifying the `--without-docker-image(-nd)` option when starting the `k2hdkcstack.sh` tool. +If you use your own Docker image, specify the `--with-docker-image(-d)` option. diff --git a/buildja.md b/buildja.md index 3409a7d..9b9b72a 100644 --- a/buildja.md +++ b/buildja.md @@ -15,94 +15,145 @@ next_string: # K2HDKC DBaaS with Trove 環境構築 [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove)と連携する**K2HDKC DBaaS with Trove** (Database as a Service for K2HDKC)の環境構築について説明します。 -この **K2HDKC DBaaS with Trove** は、[Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) にDatabaseのひとつとして 分散KVSである [K2HDKC](https://k2hdkc.antpick.ax/indexja.html) を組み込んだシステムです。 +この **K2HDKC DBaaS with Trove** は、[Trove](https://wiki.openstack.org/wiki/Trove) にDatabaseのひとつとして 分散KVSである [K2HDKC](https://k2hdkc.antpick.ax/indexja.html) を組み込んだシステムです。 ## 必要となる周辺システム **K2HDKC DBaaS** の環境を構築するためには、[OpenStack](https://www.openstack.org/) が動作している環境が必要になります。 -また、[OpenStack](https://www.openstack.org/) は、[Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) を組み込み利用します。 +また、[OpenStack](https://www.openstack.org/) は、[Trove](https://wiki.openstack.org/wiki/Trove) を組み込み利用します。 必要となる周辺のシステムを以下に示します。 -### [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) 環境 -[OpenStack](https://www.openstack.org/) の環境を準備し、これに [Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) を組み込んだ環境が必要となります。 -[Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) は、**K2HDKC DBaaS** [リポジトリ](https://github.com/yahoojapan/k2hdkc_dbaas)のパッチを適用した状態で起動します。 -そして、**K2HDKC DBaaS** [リポジトリ](https://github.com/yahoojapan/k2hdkc_dbaas)で提供するTroveのゲストOSイメージを作成し、K2HDKCサーバーノード用のOSイメージとして登録しておく必要があります。 +### [Trove](https://wiki.openstack.org/wiki/Trove) 環境 +[OpenStack](https://www.openstack.org/) の環境を準備し、これに [Trove](https://wiki.openstack.org/wiki/Trove) を組み込んだ環境が必要となります。 +[Trove](https://wiki.openstack.org/wiki/Trove) は、**K2HDKC DBaaS Trove** [リポジトリ](https://github.com/yahoojapan/k2hdkc_dbaas_trove)のパッチを適用した状態で起動します。 +そして、**K2HDKC DBaaS Trove** [リポジトリ](https://github.com/yahoojapan/k2hdkc_dbaas_trove)で提供するTroveのゲストOSイメージを作成し、K2HDKCサーバーノード用のOSイメージとして登録しておく必要があります。 +また、[OpenStack](https://www.openstack.org/) と [Trove](https://wiki.openstack.org/wiki/Trove) の `stable/2024.1`バージョン以降のために、K2HDKC Trove Dockerイメージも作成し、アクセス可能なDockerレジストリに登録しておく必要があります。 ### [K2HR3](https://k2hr3.antpick.ax/indexja.html) システム **K2HDKC DBaaS** は、バックエンドとして[K2HR3](https://k2hr3.antpick.ax/indexja.html) システムと連携します。 この[K2HR3](https://k2hr3.antpick.ax/indexja.html) システムは、OpenStackのコンポーネントおよびインスタンス(`Virtual Machine`)からアクセスできるネットワーク環境に準備してください。 ### 動作環境条件 -私たちは、**K2HDKC DBaaS**を[CentOS 8.2](https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2004)を使い、確認しています。 -また、K2HDKC DBaaSは、OpenStack [Ussuri](https://docs.openstack.org/ussuri/)を使います。 +私たちは、**K2HDKC DBaaS Trove**を[RockyLinix 9.x](https://rockylinux.org/)を使い、確認しています。 +また、K2HDKC DBaaS Troveは、OpenStack [stable/2024.1](https://docs.openstack.org/2024.1/index.html) 以降を使います。 これ以外の環境をお使いの場合、動作しない可能性があります。 -不具合などを見つけた場合は、[Issue](https://github.com/yahoojapan/k2hdkc_dbaas/issues)を送ってください。 +不具合などを見つけた場合は、[Issue](https://github.com/yahoojapan/k2hdkc_dbaas_trove/issues)を送ってください。 ## 試用環境の構築 -**K2HDKC DBaaS** は、OpenStackの[DevStack](https://docs.openstack.org/devstack/latest/) を使い、簡単に試用環境を構築できます。 -[Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) は、[DevStack](https://docs.openstack.org/devstack/latest/) を使うように設計されており、**K2HDKC DBaaS**も同様に[DevStack](https://docs.openstack.org/devstack/latest/) を使い、試用環境を構築できます。 +**K2HDKC DBaaS Trove** は、OpenStackの[DevStack](https://docs.openstack.org/devstack/latest/) をベースとして、**K2HDKC DBaaS Trove**の提供するツールを使って、簡単に試用環境を構築できます。 +[Trove](https://wiki.openstack.org/wiki/Trove) は、そのバージョンに対応した [DevStack](https://docs.openstack.org/devstack/) を使うように設計されており、**K2HDKC DBaaS Trove**も対応したバージョンの[DevStack](https://docs.openstack.org/devstack/) で試用環境を構築します。 -[Trove(Trove is Database as a Service for OpenStack)](https://wiki.openstack.org/wiki/Trove) に **K2HDKC DBaaS** を組み込むためのパッチと、バックエンドで利用する[K2HR3](https://k2hr3.antpick.ax/indexja.html) システムの試用環境構築のためのスクリプトを提供します。 +**K2HDKC DBaaS Trove**の提供するツールは、[Trove](https://wiki.openstack.org/wiki/Trove)に独自のコードを組み込み、その試用環境を構築します。 +また、試用環境に必要とされる [K2HR3](https://k2hr3.antpick.ax/indexja.html) バックエンドシステムの構築します。 +このツールは、試用環境に必要とされる専用のゲストOSイメージ、K2HDKC Trove Dockerイメージの作成、登録もできます。 ### 試用環境に必要なシステム -**K2HDKC DBaaS** 試用環境には、16GB程度のメモリ、120GB程度のディスクサイズの環境を準備してください。 +**K2HDKC DBaaS Trove** 試用環境には、16GB程度のメモリ、120GB程度のディスクサイズの環境を準備してください。 試用環境を構築するためには、[DevStack](https://docs.openstack.org/devstack/latest/)が動作する環境を準備してください。 準備する環境が、OpenStackで作成されたVirtual Machineなどの場合は、[Nested Virtualization](https://docs.openstack.org/devstack/latest/guides/devstack-with-nested-kvm.html)などを参考にして環境を整えてください。 ### 試用環境の構築 -以下に示す手順で、**K2HDKC DBaaS** の環境の構築ができます。 +以下に示す手順で、**K2HDKC DBaaS Trove** の環境の構築ができます。 -#### (1) **K2HDKC DBaaS** リポジトリの展開 +#### (1) 試用環境用ホスト設定 +**K2HDKC DBaaS Trove** の試用環境を構築するホストの環境を整えてください。 +[DevStack](https://docs.openstack.org/devstack/latest/)が動作するための準備をします。 + +**K2HDKC DBaaS Trove** の試用環境がPROXYを必要とする場合は、以降の作業を行う前に`HTTP(S)_PROXY`や`NO_PROXY`環境変数を設定してください。 + +#### (2) **K2HDKC DBaaS Trove** リポジトリの展開 試用環境を構築するために、1台のHOST(もしくは`Virtual Machine`)を準備します。 (以降の説明で``と記述された分は、すべてこのHOSTを意味します。) -試用環境を構築するHOSTに、**K2HDKC DBaaS** [リポジトリ](https://github.com/yahoojapan/k2hdkc_dbaas) を展開します。 +試用環境を構築するHOSTに、**K2HDKC DBaaS Trove** [リポジトリ](https://github.com/yahoojapan/k2hdkc_dbaas_trove) を展開します。 ``` -$ git clone https://github.com/yahoojapan/k2hdkc_dbaas.git +$ git clone https://github.com/yahoojapan/k2hdkc_dbaas_trove.git ``` -#### (2) OpenStackコントローラノードのHOST設定 -試用環境を構築するHOSTでは、Troveの機能を含むOpenStackのコントローラノードを動作させます。 -試用環境のHOSTをこれらのプロセスが動作できるように環境を整えます。 -``` -$ cd k2hdkc_dbaas/utils -$ ./custom_devstack_setup_1.sh -``` -スクリプトを実行後、試用環境のHOSTは自動的に再起動されます。 +#### (3) k2hdkcstack.sh 実行 +[k2hdkcstack.sh](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hdkcstack.md) ツールは、**K2HDKC DBaaS Trove** の試用環境を構築するツールです。 +このツールのみを実行することで、**K2HDKC DBaaS Trove** の試用環境を構築できます。 -#### (3) OpenStackコントローラノードの構築 -**K2HDKC DBaaS** の機能を含むTroveを組み込んだOpenStackコントローラノードを起動します。 -この過程で**K2HDKC DBaaS**のための`TroveゲストOSイメージ`が作成され、自動的にTroveおよびOpenStackにOSイメージとして登録されます。 -``` -$ cd k2hdkc_dbaas/utils -$ sudo install -o stack -g stack *.sh -v /opt/stack -$ sudo su - stack -$ ./custom_devstack_setup_2.sh -``` -スクリプトの実行完了後、**K2HDKC DBaaS** の機能を含むTroveを組み込んだOpenStackコントローラノードのすべてが起動しています。 +以下にこのツールを使って、初期化(クリーンアップ)、構築の例を示します。 -OpenStackコントローラノードの起動は、Dashboard(Troveパネルが組み込まれています)にアクセスして確認できます。 +##### (3-1) 初期化(クリーンアップ) +すでに試用環境が起動している場合、もしくは構築した試用環境を破棄する場合は、この初期化(クリーンアップ)を実行します。 ``` -URL: http:/// +$ cd buildutils +$ ./k2hdkcstack.sh clean -r -pr ``` -この段階では、まだ[K2HR3](https://k2hr3.antpick.ax/indexja.html) システムを構築していないため、**K2HDKC DBaaS**は動作しません。 -#### (4) [K2HR3](https://k2hr3.antpick.ax/indexja.html) システム構築 -最後に、**K2HDKC DBaaS** のバックエンドとして動作する[K2HR3](https://k2hr3.antpick.ax/indexja.html) システムを構築します。 -[K2HR3](https://k2hr3.antpick.ax/indexja.html) システムは、上記で構築したOpenStackの払い出す1つのインスタンス(`Virtual Machine`)で動作するように構築されます。 +##### (3-2) 試用環境構築 +以下のコマンドを使って、試用環境を構築します。 ``` -$ sudo su - stack -$ ./k2hr3_pack_setup.sh +$ cd buildutils +$ ./k2hdkcstack.sh start --password --without-docker-image ``` -このスクリプトは、途中であなたにブラウザでアクセスするためのhostnameもしくはIPアドレスを確認します。 -表示されているhostnameやIPアドレスと異なる値を使う場合には、この確認で修正することができます。 -スクリプトの実行完了後、試用環境を構築したHOSTを経由して、K2HR3 Web Applicationにアクセスすることができます。 +この実行により、**K2HDKC DBaaS Trove** を含む OpenStack + Trove環境が構築されます。 +また、[K2HR3](https://k2hr3.antpick.ax/indexja.html) バックエンドシステムもこの環境内に構築されます。 +**K2HDKC DBaaS Trove**によるK2HDKCクラスター(サーバーノード)を起動するための、ゲストOSイメージも作成、登録されます。 + +これにより、**K2HDKC DBaaS Trove**としての必要な環境、コンポーネントが構築できます。 -以下のように確認することができます。 +#### (4) 確認 +試用環境が正常に起動された場合、以下のように表示されます。 ``` -URL: http://:28080/ +--------------------------------------------------------------------- +[TITLE] Summary : K2HDKC DBaaS Trove +--------------------------------------------------------------------- +[SUCCESS] Started devstack (2024-XX-XX-XX:XX:XX) + You can access the DevStack(OpenStack) console from the URL: + http://devstack.localhost/ + Initial administrator users log in with admin : ********. + + K2HDKC Trove docker image: .../k2hdkc-trove:1.0.2-alpine + K2HDKC Trove backup docker image: .../k2hdkc-trove-backup:1.0.2-alpine + +[SUCCESS] Finished k2hr3setup.sh process without error. (2024-XX-XX-XX:XX:XX) + Base host(openstack trove) : + K2HR3 System(instance name) : k2hdkc-dbaas-k2hr3 + APP local port : 28080 + API local port : 18080 + K2HR3 Web appliction : http://XX.XX.XX.XX:8080/ + K2HR3 REST API : http://XX.XX.XX.XX:18080/ ``` -#### (5) 確認 -(3)で示したTrove Dashboardおよび、(4)で示すK2HR3 Web Applicationにアクセスできれば、試用環境の構築は完了です。 -試用環境を含むK2HDKC DBaaSの使い方は、次章の**K2HDKC DBaaS** の使い方で説明します。 +動作確認をするために、`DevStack(OpenStack) console from the URL` および `K2HR3 Web appliction` にアクセスし、ログインできるか確認してください。 +ログイン時のユーザ名は、`admin`、`trove`、`demo`のいずれかで試します。 + +## 補足 +### ツール +ツールは、`buildutils`ディレクトリ以下にあります。 +それぞれのツールの目的と、簡単な使い方を説明します。 + +#### k2hdkcstack.sh +**K2HDKC DBaaS Trove** 試用環境を構築することを目的としたツールです。 +このツールは、構築と同時に `k2hdkcdockerimage.sh` と `k2hr3setup.sh` を呼び出し、K2HDKC DBaaS Trove Dockerイメージの作成・登録と [K2HR3](https://k2hr3.antpick.ax/indexja.html) バックエンドシステムの構築も行います。 + +ツールのオプションおよび利用方法は、[こちら](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hdkcstack.md)を参照してください。 + +#### k2hdkcdockerimage.sh +K2HDKC DBaaS Trove Dockerイメージの作成と登録をするツールです。 + +**K2HDKC DBaaS Trove** は、K2HDKC クラスターのサーバーノード用と、そのノードのバックアップ用のDockerイメージが必要です。 +このツールは、これらの2つのDockerイメージ(`k2hdkc-trove`、`k2hdkc-trove-backup`)を作成・登録します。 +このツールは、`k2hdkcstack.sh` から呼び出されます。 +また、直接利用することもできます。 + +ツールのオプションおよび利用方法は、[こちら](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hdkcdockerimage.md)を参照してください。 + +#### k2hr3setup.sh +試用環境のために最小構成の[K2HR3](https://k2hr3.antpick.ax/indexja.html) バックエンドシステムを構築するツールです。 +このツールは`k2hdkcstack.sh` から呼び出されることを想定していますので、直接利用する必要はありません。 + +ツールのオプションおよび利用方法は、[こちら](https://github.com/yahoojapan/k2hdkc_dbaas_trove/blob/master/buildutils/README_k2hr3setup.md)を参照してください。 + +### K2HDKC DBaaS Troveイメージ +**K2HDKC DBaaS Trove** は、K2HDKC クラスターのサーバーノード用と、そのノードのバックアップ用のDockerイメージが必要です。 + +私たちは、これらのDockerイメージを [DockerHub](https://hub.docker.com/) から頒布しています。 +- [k2hdkc-trove](https://hub.docker.com/r/antpickax/k2hdkc-trove) +- [k2hdkc-trove-backup](https://hub.docker.com/r/antpickax/k2hdkc-trove-backup) + +このDockerイメージを利用する場合は、`k2hdkcstack.sh` ツールを起動するときに、`--without-docker-image(-nd)`オプションを指定し、Dockerイメージの作成・登録をスキップできます。 +独自のDockerイメージを利用する場合には、`--with-docker-image(-d)`オプションを指定してください。 diff --git a/images/usage_backup_information.png b/images/usage_backup_information.png index 632e219..c2a9d33 100644 Binary files a/images/usage_backup_information.png and b/images/usage_backup_information.png differ diff --git a/images/usage_backups.png b/images/usage_backups.png index 546705d..1348027 100644 Binary files a/images/usage_backups.png and b/images/usage_backups.png differ diff --git a/images/usage_cluster_add_instance_dialog.png b/images/usage_cluster_add_instance_dialog.png index 33e814e..0a87db2 100644 Binary files a/images/usage_cluster_add_instance_dialog.png and b/images/usage_cluster_add_instance_dialog.png differ diff --git a/images/usage_cluster_create_dialog.png b/images/usage_cluster_create_dialog.png index 17b78fc..e7459f4 100644 Binary files a/images/usage_cluster_create_dialog.png and b/images/usage_cluster_create_dialog.png differ diff --git a/images/usage_cluster_growing.png b/images/usage_cluster_growing.png index 1c76bbd..7527280 100644 Binary files a/images/usage_cluster_growing.png and b/images/usage_cluster_growing.png differ diff --git a/images/usage_cluster_information.png b/images/usage_cluster_information.png index d35dcd8..5b7953b 100644 Binary files a/images/usage_cluster_information.png and b/images/usage_cluster_information.png differ diff --git a/images/usage_cluster_launched.png b/images/usage_cluster_launched.png index 74f3d70..ec55756 100644 Binary files a/images/usage_cluster_launched.png and b/images/usage_cluster_launched.png differ diff --git a/images/usage_cluster_server_nodes.png b/images/usage_cluster_server_nodes.png index 513d968..30cb6ea 100644 Binary files a/images/usage_cluster_server_nodes.png and b/images/usage_cluster_server_nodes.png differ diff --git a/images/usage_configurationgroup_create_dialog.png b/images/usage_configurationgroup_create_dialog.png index 11c909d..8101fde 100644 Binary files a/images/usage_configurationgroup_create_dialog.png and b/images/usage_configurationgroup_create_dialog.png differ diff --git a/images/usage_instance_detached_information.png b/images/usage_instance_detached_information.png index 569a759..08dd8a8 100644 Binary files a/images/usage_instance_detached_information.png and b/images/usage_instance_detached_information.png differ diff --git a/images/usage_instance_information.png b/images/usage_instance_information.png index c6329de..78f1a14 100644 Binary files a/images/usage_instance_information.png and b/images/usage_instance_information.png differ diff --git a/images/usage_instances_create_dialog_advanced.png b/images/usage_instances_create_dialog_advanced.png index 45ea518..59b60d0 100644 Binary files a/images/usage_instances_create_dialog_advanced.png and b/images/usage_instances_create_dialog_advanced.png differ diff --git a/images/usage_instances_create_dialog_details.png b/images/usage_instances_create_dialog_details.png index b1e6ee8..39f376c 100644 Binary files a/images/usage_instances_create_dialog_details.png and b/images/usage_instances_create_dialog_details.png differ diff --git a/images/usage_instances_created.png b/images/usage_instances_created.png index c305e8e..32f42b7 100644 Binary files a/images/usage_instances_created.png and b/images/usage_instances_created.png differ diff --git a/images/usage_instances_detached.png b/images/usage_instances_detached.png index f05384f..afd252d 100644 Binary files a/images/usage_instances_detached.png and b/images/usage_instances_detached.png differ diff --git a/images/usage_restore_dialog.png b/images/usage_restore_dialog.png index 1505d89..0fc3e14 100644 Binary files a/images/usage_restore_dialog.png and b/images/usage_restore_dialog.png differ diff --git a/images/usage_slave_launched_instance.png b/images/usage_slave_launched_instance.png index 57ea86f..1ed6b02 100644 Binary files a/images/usage_slave_launched_instance.png and b/images/usage_slave_launched_instance.png differ diff --git a/images/usage_slave_openstack_images.png b/images/usage_slave_openstack_images.png index 793a963..51fcb5e 100644 Binary files a/images/usage_slave_openstack_images.png and b/images/usage_slave_openstack_images.png differ diff --git a/index.md b/index.md index de160bf..3b99807 100644 --- a/index.md +++ b/index.md @@ -48,7 +48,7 @@ What's new about **K2HDKC DBaaS**. Each **K2HDKC DBaaS** source code is in the [Github](https://github.com/) repository shown below. -- [k2hdkc_dbaas repository](https://github.com/yahoojapan/k2hdkc_dbaas) +- [k2hdkc_dbaas_trove repository](https://github.com/yahoojapan/k2hdkc_dbaas_trove) The source code repository for [K2HDKC DBaaS with Trove](overview_trove.html) - [k2hdkc_dbaas_cli repository](https://github.com/yahoojapan/k2hdkc_dbaas_cli) The source code repository for [K2HDKC DBaaS CLI](overview_cli.html) (Command Line Interface) diff --git a/indexja.md b/indexja.md index c397111..5305c59 100644 --- a/indexja.md +++ b/indexja.md @@ -44,7 +44,7 @@ arrow_link_usage: