|
| 1 | +# Enterprise Edition |
| 2 | + |
| 3 | +In this article, you will be guided through self-hosting **Openblocks Enterprise Edition (EE)** using Docker or Docker Compose: |
| 4 | + |
| 5 | +* If you're new to Openblocks, we highly recommend you deploy with the [all-in-one image](enterprise-edition.md#all-in-one-image-all-services-in-one-container). |
| 6 | +* For current users of **Openblocks Community Edition (CE)**, please follow instructions in [Upgrade to Enterprise Edition](enterprise-edition.md#upgrade-to-enterprise-edition) section. |
| 7 | + |
| 8 | +{% hint style="info" %} |
| 9 | +A **License Key** is necessary to deploy or upgrade to Enterprise Edition. Feel free to contact our team at <mark style="color:blue;">fan@openblocks.dev</mark> or on [Discord](https://discord.com/invite/z5W2YHXdtt) if needed. |
| 10 | + |
| 11 | +The lack of License Key will not hinder the process of starting and maintaining Openblocks EE services but display the paid features as disabled. |
| 12 | +{% endhint %} |
| 13 | + |
| 14 | +## Premium features |
| 15 | + |
| 16 | +* Enterprise ID providers: Google, GitHub, Azure AD, Okta, Keycloak, CAS, LDAP, JWT and more |
| 17 | +* White labeling ([Customize branding](../workspace-management/customize-branding.md)) |
| 18 | +* Air-gapped deployment |
| 19 | +* Audit logs |
| 20 | +* Priority support |
| 21 | + |
| 22 | +## All-in-one image: all services in one container |
| 23 | + |
| 24 | +For easy setup and deployment, we provide an all-in-one image which bundles frontend, backend and data persistence services altogether in one single container. |
| 25 | + |
| 26 | +### Prerequisites |
| 27 | + |
| 28 | +* [Docker](https://docs.docker.com/get-docker/) (version 20.10.7 or above) |
| 29 | +* [Docker-Compose](https://docs.docker.com/compose/install/) (version 1.29.2 or above) |
| 30 | + |
| 31 | +{% hint style="info" %} |
| 32 | +Recommended system spec: 1-core CPU and 2 GB RAM. |
| 33 | + |
| 34 | +Windows users are recommended to use PowerShell for running terminal commands below. |
| 35 | +{% endhint %} |
| 36 | + |
| 37 | +In your working directory, run the following commands to make a directory named `openblocks` to store the data of Openblocks: |
| 38 | + |
| 39 | +```bash |
| 40 | +mkdir openblocks |
| 41 | +cd openblocks |
| 42 | +``` |
| 43 | + |
| 44 | +### Deploy |
| 45 | + |
| 46 | +{% tabs %} |
| 47 | +{% tab title="Docker-Compose (Recommend)" %} |
| 48 | +Follow the steps below: |
| 49 | + |
| 50 | +1. Download the configuration file by clicking [docker-compose.yml](https://cdn-files.openblocks.dev/docker-compose.yml) or running the curl command:  |
| 51 | + |
| 52 | + {% code overflow="wrap" %} |
| 53 | + ```bash |
| 54 | + curl https://cdn-files.openblocks.dev/docker-compose.yml -o $PWD/docker-compose.yml |
| 55 | + ``` |
| 56 | + {% endcode %} |
| 57 | +2. Edit the yaml file just downloaded: |
| 58 | + * `image`: should be modified to `openblocksdev/openblocks-ee`. |
| 59 | + * `contanier_name`: should be changed only when you run into container-naming conflicts. If changed, please remember to also replace default container name `openblocks` with the new one in commands like `docker logs`, `docker-compose rm`, `docker restart`, and so on.  |
| 60 | + |
| 61 | + <figure><img src="../.gitbook/assets/enterprise-edition-1.png" alt=""><figcaption></figcaption></figure> |
| 62 | +3. Start the Docker container by running this command: |
| 63 | + |
| 64 | + ```bash |
| 65 | + docker-compose up -d |
| 66 | + ``` |
| 67 | + |
| 68 | + \ |
| 69 | + The docker image will be pulled from docker hub during the initial start-up.\ |
| 70 | + |
| 71 | + |
| 72 | + <figure><img src="../.gitbook/assets/enterprise-edition-2.png" alt=""><figcaption></figcaption></figure> |
| 73 | +4. Fill in your License Key in `stacks/configuration/application-selfhost.yml`, as shown below. Note that the `key:` should always be followed by a **space**, then the license key.  |
| 74 | + |
| 75 | + <figure><img src="../.gitbook/assets/enterprise-edition-3.png" alt=""><figcaption></figcaption></figure> |
| 76 | +5. Restart the container using this command: |
| 77 | + |
| 78 | + ```bash |
| 79 | + docker restart openblocks |
| 80 | + ``` |
| 81 | +6. Check the logs by running this command: |
| 82 | + |
| 83 | + ```bash |
| 84 | + docker logs -f openblocks |
| 85 | + ``` |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + When you see **frontend**, **backend**, **redis**, and **mongo** **entered the RUNNING state**, the Openblocks service has officially started.\ |
| 90 | + |
| 91 | + |
| 92 | + <figure><img src="../.gitbook/assets/enterprise-edition-4.png" alt=""><figcaption></figcaption></figure> |
| 93 | +7. Visit [**http://localhost:3000**](http://localhost:3000) and click **Sign up**. Openblocks will automatically create a workspace for you, then you can start building your apps and invite members to your workspace. |
| 94 | + |
| 95 | + <figure><img src="../.gitbook/assets/enterprise-edition-5.png" alt=""><figcaption></figcaption></figure> |
| 96 | +{% endtab %} |
| 97 | + |
| 98 | +{% tab title="Docker" %} |
| 99 | +1. Run the command below to pull `openblocks-ee` image and start the container `openblocks`: |
| 100 | + |
| 101 | + {% code overflow="wrap" %} |
| 102 | + ```bash |
| 103 | + docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ee |
| 104 | + ``` |
| 105 | + {% endcode %} |
| 106 | +2. Fill in your License Key in `stacks/configuration/application-selfhost.yml`. Note that the `key:` should always be followed by a **space**, then the license key.  |
| 107 | +3. Restart the container using this command: |
| 108 | + |
| 109 | + {% code overflow="wrap" %} |
| 110 | + ```bash |
| 111 | + docker restart openblocks |
| 112 | + ``` |
| 113 | + {% endcode %} |
| 114 | +{% endtab %} |
| 115 | +{% endtabs %} |
| 116 | + |
| 117 | +### Update |
| 118 | + |
| 119 | +{% tabs %} |
| 120 | +{% tab title="Docker-Compose" %} |
| 121 | +Run the following commands to update to the latest Openblocks image: |
| 122 | + |
| 123 | +```bash |
| 124 | +docker-compose pull |
| 125 | +docker-compose rm -fsv openblocks |
| 126 | +docker-compose up -d |
| 127 | +``` |
| 128 | +{% endtab %} |
| 129 | + |
| 130 | +{% tab title="Docker" %} |
| 131 | +Run the following commands to update to the latest Openblocks image: |
| 132 | + |
| 133 | +{% code overflow="wrap" %} |
| 134 | +```bash |
| 135 | +docker pull openblocksdev/openblocks-ee |
| 136 | +docker rm -fv openblocks |
| 137 | +docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ee |
| 138 | +``` |
| 139 | +{% endcode %} |
| 140 | +{% endtab %} |
| 141 | +{% endtabs %} |
| 142 | + |
| 143 | +## Customize configurations |
| 144 | + |
| 145 | +You can customize deployment configurations by setting environment variables. For detailed information, see [Customize configurations](./#customize-configurations). |
| 146 | + |
| 147 | +## Upgrade to Enterprise Edition |
| 148 | + |
| 149 | +If you have been using Openblocks Community Edition and want to upgrade to Enterprise Edition, follow the steps below to start Openblocks(EE) containers **based on your current data** stored in MongoDB. |
| 150 | + |
| 151 | +{% hint style="info" %} |
| 152 | +Feel free to contact us at <mark style="color:blue;">fan@openblocks.dev</mark> or on [Discord](https://discord.com/invite/z5W2YHXdtt) when you encounter any problem. |
| 153 | +{% endhint %} |
| 154 | + |
| 155 | +{% tabs %} |
| 156 | +{% tab title="Docker-Compose" %} |
| 157 | +1. Edit the Dockerfile [docker-compose.yml](https://cdn-files.openblocks.dev/docker-compose.yml) in your working directory: |
| 158 | + * For developers self-hosting with the all-in-one image: the `image` field of `openblocks` service should be modified to `openblocksdev/openblocks-ee`.  |
| 159 | + |
| 160 | + <figure><img src="../.gitbook/assets/enterprise-edition-1.png" alt=""><figcaption></figcaption></figure> |
| 161 | +2. Pull the latest all-in-one image of Enterprise Edition using the modified Dockerfile. |
| 162 | + |
| 163 | +```bash |
| 164 | +docker-compose pull |
| 165 | +``` |
| 166 | + |
| 167 | +3. Stop and remove the Openblocks CE service container. |
| 168 | + |
| 169 | +```bash |
| 170 | +docker-compose rm -fsv YOUR_CE_CONTAINER_NAME |
| 171 | +``` |
| 172 | + |
| 173 | +4. Run the Openblocks EE container in the background (the Detached mode). |
| 174 | + |
| 175 | +```bash |
| 176 | +docker-compose up -d |
| 177 | +``` |
| 178 | + |
| 179 | +5. Fill in your License Key in `stacks/configuration/application-selfhost.yml`. Note that the `key:` should always be followed by a **space**, then the license key. |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + <figure><img src="../.gitbook/assets/enterprise-edition-3.png" alt=""><figcaption></figcaption></figure> |
| 184 | +6. Restart the Openblocks EE container. |
| 185 | + |
| 186 | +```bash |
| 187 | +docker restart YOUR_EE_CONTAINER_NAME |
| 188 | +``` |
| 189 | + |
| 190 | +7. Check the log of the container, and wait for **frontend**, **backend**, **redis**, and **mongo** services to have **entered the RUNNING state**. |
| 191 | + |
| 192 | +```bash |
| 193 | +docker logs -f YOUR_EE_CONTAINER_NAME |
| 194 | +``` |
| 195 | +{% endtab %} |
| 196 | + |
| 197 | +{% tab title="Docker" %} |
| 198 | +Before starting, make sure you have redirected to the working directory where your current data is stored. |
| 199 | + |
| 200 | +1. Pull the latest all-in-one image of Enterprise Edition. |
| 201 | + |
| 202 | +```bash |
| 203 | +docker pull openblocksdev/openblocks-ee |
| 204 | +``` |
| 205 | + |
| 206 | +2. Stop and remove the Openblocks CE service container. |
| 207 | + |
| 208 | +```bash |
| 209 | +docker rm -fv YOUR_CE_CONTAINER_NAME |
| 210 | +``` |
| 211 | + |
| 212 | +3. Run the Openblocks EE container in the background (the Detached mode). |
| 213 | + |
| 214 | +{% code overflow="wrap" %} |
| 215 | +```bash |
| 216 | +docker run -d --name YOUR_EE_CONTAINER_NAME -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocksdev/openblocks-ee |
| 217 | +``` |
| 218 | +{% endcode %} |
| 219 | + |
| 220 | +4. Fill in your License Key in `stacks/configuration/application-selfhost.yml`. Note that the `key:` should always be followed by a **space**, then the license key. |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + <figure><img src="../.gitbook/assets/enterprise-edition-3.png" alt=""><figcaption></figcaption></figure> |
| 225 | +5. Restart the Openblocks EE container. |
| 226 | + |
| 227 | +```bash |
| 228 | +docker restart YOUR_EE_CONTAINER_NAME |
| 229 | +``` |
| 230 | + |
| 231 | +6. Check the log of the container, and wait for **frontend**, **backend**, **redis**, and **mongo** services to have **entered the RUNNING state**. |
| 232 | + |
| 233 | +```bash |
| 234 | +docker logs -f YOUR_EE_CONTAINER_NAME |
| 235 | +``` |
| 236 | +{% endtab %} |
| 237 | +{% endtabs %} |
0 commit comments