.NET Core application server on Linux
PDF

Deploy Creatio .NET Core application server on Linux

Products
All Creatio products

Before you deploy the server, perform the following steps:

Please note that the specifics of the deployment procedure may vary, depending on the chosen DBMS.

Note. The procedure for running PostgreSQL in Docker is covered in the Docker documentation.

Method 1. Deploy Creatio .NET Core application server on Linux directly 

To deploy Creatio application server:

  • Install .NET Core, GDI+ compatible API on non-Windows operating systems, and Development libraries and header files for GNU C. Read more >>>

  • Run Creatio application server. Read more >>>

Install .NET Core and other Creatio dependencies 

  1. Download the packages-microsoft-prod package:

    wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
  2. Log in as root:

    sudo su
  3. Install the downloaded package:

    dpkg -i packages-microsoft-prod.deb
  4. Update the package lists:

    apt-get update
  5. Install the APT transport for downloading via the HTTP Secure protocol:

    apt-get install apt-transport-https
  6. Update the package lists:

    apt-get update
  7. Install .NET Core:

    apt-get install dotnet-sdk-3.1
  8. Install GDI+ compatible API on non-Windows operating systems:

    apt-get install -y libgdiplus
  9. Install development libraries and header files for GNU C:

    apt-get install -y libc6-dev
  10. Log out from your root session:

    exit

Run Creatio application server 

Note. If you are deploying the .Net Core development environment with access via  HTTP, modify the Terrasoft.WebHost.dll.config file (located at the application root folder) before you run the application. Specify the following value for the "add key" parameter:

<add key="CookiesSameSiteMode" value="Lax" />

This ensures correct operation both via the HTTPS and HTTP protocols. Note that the mobile application will not be operational if you use this setting.

To run the application:

  1. Navigate to the directory with Creatio setup files:

    cd /path/to/application/directory/
  2. Run the .Net Core server:

    dotnet Terrasoft.WebHost.dll

The HTTP version of the Creatio application will be available on port 5000.

The HTTPS version of the Creatio application will be available on port 5002.

Note. To log in to a newly deployed application, use the default Supervisor user account. It is highly recommended to change the Supervisor password immediately. Login: Supervisor; Password: Supervisor.

Method 2. Deploy Creatio .NET Core application server on Linux using Docker 

Use this deployment method to run a compartmentalized Creatio application. We assume that you have installed the Redis sever, deployed the Creatio database, and set up the ConnectionStrings.config file using the instructions in the previous steps.

To deploy Creatio application server using Docker:

ATTENTION. We recommend deploying the application using Docker for development and testing environments only. Please avoid using Docker for the production environment before we implement the support of the application updates in Docker (planned for the upcoming releases).

Configure Creatio caching server (Redis) 

  1. Open redis.conf in a text editor as root. For example, use the Nano text editor:

    sudo nano /etc/redis/redis.conf
  2. Locate the “bind 127.0.0.1 ::1” entry. Replace the entry with “bind 0.0.0.0” to listen to all available IPV4 interfaces.

  3. Save changes and exit the editor.

  4. Restart the Redis server:

    sudo systemctl restart redis-server

Install Docker 

To install Docker, run:

sudo apt-get install docker

Create a Dockerfile 

To create a Dockerfile:

  1. Navigate to the application directory:

    cd /path/to/application/directory/

    /path/to/application/directory/ – the directory with Creatio setup files.

  2. Create a Dockerfile using a text editor. For example, use the Nano text editor:

    nano Dockerfile
  3. Insert the following code:

    FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS base
    EXPOSE 5000 5002
    
    RUN apt-get update && \
        apt-get -y --no-install-recommends install \
        libgdiplus \
        libc6-dev && \
        apt-get clean all && \
        rm -rf /var/lib/apt/lists/* /var/cache/apt/*
    
    WORKDIR /app
    COPY . ./
    
    FROM base AS final
    WORKDIR /app
    ENV ASPNETCORE_ENVIRONMENT Development
    ENV TZ US/Eastern
    ENTRYPOINT "dotnet", "Terrasoft.WebHost.dll"
    
    FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS base
    EXPOSE 5000 5002
    
    RUN apt-get update && \
    apt-get -y --no-install-recommends install \
    libgdiplus \
    libc6-dev && \
    apt-get clean all && \
       rm -rf /var/lib/apt/lists/* /var/cache/apt/*
    
    WORKDIR /app
    COPY . ./
    
    FROM base AS final
    WORKDIR /app
    ENV ASPNETCORE_ENVIRONMENT Development
    ENV TZ US/Eastern
    ENTRYPOINT "dotnet", "Terrasoft.WebHost.dll"
  4. Press Ctrl+O to apply the changes.

  5. Save changes and exit the editor.

Build and run a Docker image 

Build a docker image:

docker build -f Dockerfile -t creatioimg .

Run the docker image:

docker run -p http_port_number:5000 -p https_port_number:5002  -d --dns=DNS_server_ip --dns-search=DNS_address_suffix -v /logspath/mycreatio:/app/Logs --name Creatio creatioimg

http_port_number – a port number. Docker will serve the HTTP version on this port

https_port_number – a port number. Docker will serve the HTTPS version on this port

DNS_server_ip – the IP address of a DNS server to enable the container to resolve Internet domains. You can use multiple --dns flags for multiple DNS servers.

DNS_address_suffix – a DNS search domain to enable the container to search non-fully-qualified hostnames. You can use multiple --dns-search flags for multiple DNS search domains.

Note. Add the --restart=always flag to the command make a persistent Docker container.

The HTTP version of the Creatio application will be available on port http_port_number.

The HTTPS version of the Creatio application will be available on port https_port_number.

Note. To log in to a newly deployed application, use the default Supervisor user account. It is highly recommended to change the Supervisor password immediately. Login: Supervisor; Password: Supervisor.