(feat) deployment scenarios

This commit is contained in:
cardosofede
2023-02-23 16:20:43 -03:00
parent 6676827c4d
commit 3ba16a6173
17 changed files with 1050 additions and 113 deletions

73
bash_scripts/README.md Normal file
View File

@@ -0,0 +1,73 @@
# Docker commands
## Setup
The followings scripts assume that [Docker](https://www.docker.com/) has already been installed.
They also assume that the user has Docker permissions without requiring `sudo`. If you do not have these permissions:
1. Enter the following command:
```
sudo usermod -a -G docker $USER
```
2. Run the following command to change the permissions of all files with the ".sh" extension in the current directory, making them executable for all users.:
```
chmod a+x *.sh
```
3. Log out and log back into your console to enable them.
## Hummingbot Client
### Create an instance of Hummingbot
The `hummingbot-create.sh` script will create the folders needed to run Hummingbot and then install Hummingbot.
```
./create.sh
```
### Start up / connect to an instance of Hummingbot
The `hummingbot-start.sh` script will connect to a running instance of Hummingbot.
```
./start.sh
```
### Updating Hummingbot version
The `hummingbot-update.sh` script will update your instance to the latest version of Hummingbot.
```
./update.sh
```
## Gateway
### Create Gateway Instance
The `gateway-create.sh` script helps you pull, configure, and run the Gateway Docker image.
```
./gateway-create.sh
```
### Copy Hummingbot Certs
If you didn't do this step during `gateway-create.sh`, the `gateway-copy-certs.sh` script helps you copy the SSL certificates generated by Hummingbot into your Gateway files `certs` folder. This lets your Hummingbot instance access Gateway securely.
```
./gateway-copy-certs.sh
```
### Useful Commands
These commands assume a Gateway container with the default instance name `gateway`:
* List all Gateway containers: `docker ps -a --filter ancestor=hummingbot/gateway`
* Start Gateway container and attach to it: `docker start gateway && docker attach gateway`
* Stop Gateway container: `docker stop gateway`
* Update Gateway container to latest version: `docker pull hummingbot/gateway:latest`
* Remove Gateway container: `docker rm gateway`