Getting Started
Last updated
Last updated
This section presents how to quickly run the WorkflowGen container with a minimal architecture on your local machine.
Make sure to have a valid WorkflowGen license.
If you're using Windows Server, make sure that it's Windows Server 2019, and use the tag that corresponds to that version. For example, for Windows Server 2019, use the tag that ends with ltsc2019
.
At the end of this section, the following architecture will be deployed on your local machine:
Inside the Docker engine on your machine, you'll have a running WorkflowGen server and a WorkflowGen database. Both of these will use volumes mapped to your local machine to persist data files.
Make sure to have installed Docker on your machine.
Follow the instructions in the Docker Desktop guide to install Docker for Windows. You must be using Windows containers, so you need at least Windows 10 Pro.
For Windows Server
Do not install Docker for Windows on Windows Server. It is designed for development only.
If you've provisioned a virtual machine on your cloud provider where the template indicates something like Windows Server with Containers
, it's probably safe to assume that Docker is already installed. Execute docker version
on the machine to verify that it is. If so, you can skip the installation process.
Follow the instructions in the Docker Desktop guide to install Docker on Windows Server.
For this setup, it's recommended to use WorkflowGen's database Docker image. You can also use a SQL database installed on your local machine.
To download the database image into your local machine, open PowerShell and enter the following:
Don't forget to use the correct tag for your version of Windows.
The Windows version of the advantys/workflowgen-sql
image is designed for development or testing only. It is not suited for production workloads. Instead, consider using the Linux version of the image (e.g. advantys/workflowgen-sql:7.18.2-ubuntu-18.04
).
For WorkflowGen to work, you need to run the database before running WorkflowGen. Before creating the container, create a Docker volume in order to externalize the database files (.mdf
and .ldf
). This will ensure that the data are still there after the deletion of the container.
The physical location of the volume can be obtained using the following command:
Typically, it will be stored in C:\ProgramData\Docker\volumes\sqldata\_data
. Make sure that the container has write access to this directory (see the Persistent Storage in Containers Microsoft article for information).
You're now ready to run the database container. To do this, execute the following command:
This last command will set the passwords of the SA database user, the WFGEN_USER
database user, and the wfgen_admin
WorkflowGen account asstrong(!)Pass
. Per the nature of Docker, the SA_PASSWORD
and ACCEPT_EULA
environment variables come from the microsoft/mssql-server-windows-express
base container and are not directly handled by the WorkflowGen container.
Enter the following to download the WorkflowGen image:
Don't forget to use the correct tag for your version of Windows (see Global prerequisites above).
For this container, you need two volumes in order to correctly persist the WorkflowGen data:
WorkflowGen licenses (licenses
)
WorkflowGen's data (data
), which contains the following:
The App_data
folder (appdata
)
Workflow applications (wfapps
)
You now need to copy your WorkflowGen license into the licenses volume. To do this, execute the following command:
This way, the WorkflowGen container will be able to pick it up via the volume. You also need an encryption key for the container; use the following command to generate one:
To run the actual container, replace <YOUR_WFG_LIC_KEY>
with your WorkflowGen license key and <YOUR_NEW_GUID>
with the GUID that you generated in the last step, then execute the following command:
When the container is ready, open a browser and go to http://localhost:8080/wfgen
, where you'll be prompted for WorkflowGen authentication. By default, the container is configured with the application authentication method.
Once you're done with this environment, you can shut down containers by stopping them. They can be restarted later.
Any environment variable defined will be reapplied after restarting a container. Therefore, any changes made to a web.config
file without environment variables will not be carried between restarts or re-runs.
This action keeps data in the container's file system between restarts. If you add a file that isn't in a volume, it will be kept after restarting.
To completely remove containers, there's only one command to execute:
This will remove the database and WorkflowGen containers including, any manual change in the container's file system that is not part of a volume. Even if the containers are gone, the data in the volumes are retained and can be used by other containers. For example, you could launch three other WorkflowGen containers that use the same volumes and they will all get the exact same files at the mount point of the volume.
This section describes the recommended way to easily deploy a local development environment without having to enter a lot of commands. You can find out more about Docker Compose in the Docker documentation at Overview of Docker Compose.
At the end of this section, the following architecture will be deployed on your local machine:
Inside the Docker engine on your machine, you'll have a running WorkflowGen server and a WorkflowGen database. Both of these will use volumes mapped to your local machine to persist data files.
Follow the instructions in the Docker Desktop guide to install Docker for Windows. You must be using Windows containers, so you need at least Windows 10 Pro.
For Windows Server
Do not install Docker for Windows on Windows Server. It is designed for development only.
If you've provisioned a virtual machine on your cloud provider where the template indicates something like Windows Server with Containers
, it's probably safe to assume that Docker is already installed; execute docker version
on the machine to verify that it is. If so, you can skip the installation process.
Follow the instructions for Windows Server in the Docker Desktop guide to install Docker on Windows Server.
On Windows Server only, you also need to install the Docker Compose tool, since it's not installed by default. Follow the instructions for Windows Server in the Install Docker Compose guide. To verify that Docker Compose is properly installed, run the following command:
For this setup, it's recommended to use WorkflowGen's database Docker image. You can also use a SQL database installed on your local machine.
Before creating the services, you need to create the license volume externally from the composition in order to have the licenses present at the time of container creation. To do this, execute the following command:
Then, you need to copy your license file to the licenses directory. The following command will show you where the license will be stored:
To copy your license, execute the following command:
This value should be generated by you. A simple GUID will suffice since it has sufficient entropy not to be guessed:
For each service that you'll create (one for WorkflowGen and one for the database), you'll need a file that contains all of the environment variables for that service.
Use the following file as a template:
Save it as database.env
using the path where you'll put the Compose file.
Use the following file as a template:
Replace <YOUR_WFG_LIC_KEY>
with the value of your WorkflowGen license key. Replace <YOUR_NEW_GUID>
with the symmetric encryption key that you have generated earlier.
Save this file as workflowgen.env
using the path where you'll put the Compose file.
To deploy services with Docker Compose, you need a Compose file that describes them. Use the following Compose file for this example:
Save this file as docker-compose.yml
using the path where you put your environment variable files, then execute the following command:
Wait a few minutes for the containers to get started, then open a browser and navigate to http://localhost:8080/wfgen
, where you will be prompted for authentication. Enter the credentials (username wfgen_admin
and password strong(!)Pass
) and it should display the WorkflowGen home page.