- In the Tencent Cloud console, select "Cloud Access Management/API Keys"
- Press "Create Key" to create aa new access key. Save the "SecretId" and "SecretKey" in a secure place select "Compute/Cloud Virtual Machine"
- Using the Tencent Cloud console, go to "Cloud Object Storage", select "Bucket List", then press "Create Bucket" button. Choose a region that is in the same region as your VM (or geographically close to you if running HSDS on a external machine). Enter a bucket name, and click "Next". For other options, the default values should be fine. Record the bucket name and endpoint value.
- Next in the console go to "Compute/Cloud Virtual Machine" and in the "Instances" pane, press the "Create" button to create a new VM
- Select region and billing mode as desired
- Select instance type. 4 core cpu and 16 GB memory recommended for best performance
- Keep the default "TencentOS" image, and 50GB SSD storage
- For the security group, enable ports 22, and 80
- Start instance and ssh into the instance. The following steps will be performed on the instance
- Install Python 3 (e.g. with Miniconda https://docs.conda.io/en/latest/miniconda.html)
- Install docker compose by running:
$ curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker compose
, and$ chmod +x /usr/local/bin/docker-compose
- If docker is not running, start it with:
systemctl start docker
- Get project source code:
$ git clone https://github.com/HDFGroup/hsds
- Go to the hsds directory and run:
$ ./build.sh
- Go to admin/config directory:
$ cd hsds/admin/config
- Copy the file "passwd.default" to "passwd.txt". Add any usernames/passwords you wish. Modify existing passwords (for admin, test_user1, test_user2) for security.
- If group-level permissions are desired (See Authorization), copy the file "groups.default" to "groups.txt". Modify existing groups as needed
- Create environment variables as in "Sample .bashrc" below. Run
$ source .bashrc
to update the environment - Create the file admin/config/override.yml for deployment specific settings (see "Sample override.yml") if desired
- Start the service
$./runall.sh <n>
where n is the number of containers desired (defaults to 4). Typically you'll want this to be the number of cores on your VM. - Run
$ docker ps
and verify that the containers are running: hsds_head, hsds_sn_[1-n], hsds_dn_[1-n] - Run
$ curl http://127.0.0.1:5101/about
and verify that "cluster_state" is "READY" (might need to give it a minute or two) - Perform post install configuration. See: Post Install Configuration
These environment variables will be passed to the Docker containers on start up.
export AWS_ACCESS_KEY_ID=1234567890 # Use SecretId from API Keys
export AWS_SECRET_ACCESS_KEY=ABCDEFGHIJKL # Use SecretKey from API Keys
export BUCKET_NAME=hsdstest-123456789 # set to the name of the bucket you will be using
export AWS_S3_GATEWAY=http://cos.ap-hongkong.myqcloud.com # Use the endpoint given for your bucket
export HSDS_ENDPOINT=http://hsds.hdf.test # The DNS name of the instance
export LOG_LEVEL=INFO # Verbosity of server logs (DEBUG, INFO, WARN, or ERROR)
Review the contents of admin/config/config.yml and create the file admin/config/override.yml for any keys where you don't wish to use the default value. E.g. "server_name".
To get the latest codes changes from the HSDS repo do the following:
- Shutdown the service:
$ stopall.sh
- Get code changes:
$ git pull
- Build a new Docker image:
$ ./build/sh
- Start the service:
$ ./runall.sh