# ACE Installation via Wamp or PHP Stack

Use this guide if you are not installing ACE using the Docker Environment.

# Install Apache and PHP

Please follow the Assure Deployment documentation for these two if there are not already installed.

# Install Node and NPM

Go to the following link here (opens new window) to download the Node installer (please select the LTS version) and proceed to install it on the server. After it is installed, open a command line window and type the following to verify that Node and NPM is installed:

node -v
npm -v

# Install Composer

Navigate to the Composer Website (opens new window) and click on getting started and then from the page that loads a menu should display at the top with links to Intallation - Windows (opens new window). Use these directions to install Composer on your windows machine.

# Clone ACE Repository

Now that all requirements are installed:

  1. Log into Bitbucket (opens new window) and navigate to the ACE repository (opens new window).
  2. Click the Clone button located on the repository and copy the command to clone the repo.
    • It should look something like this: git clone https://{username}@bitbucket.org/epicphp/client-interface.git
  3. Open a terminal window and go to the Apache www folder (usually located at c:\wamp\www).
  4. Paste the git clone command you got from the repo and add to the end of it with a space before it: {company_code}_ace and press enter.
    • Replace the {company_code} with the Assure company code that it will be linked to.

# Configure Apache

  1. Navigate to the Apache vhost config file (usually found at c:\wamp\bin\apache\apache2.4.41\conf\extra\httpd-vhosts.conf).
  2. Add a new virtualhost block for ACE. It should look like the example below:
<VirtualHost *:{port number}>
	ServerName ace.epicassure.com:{port number}
	DocumentRoot "c:/wamp/www/{ace_folder_name}/public"
	<Directory "c:/wamp/www/{ace_folder_name}/public/">
		Options Indexes FollowSymLinks MultiViews
		Allowoverride all
		Require all granted
	</Directory>
</VirtualHost>
  1. After the Apache vhost file has been modified, restart the Apache service.
  2. Confirm that ACE loads within the browser locally at http://localhost:{port setup in apache} and externally (at the public IP and/or domain of the server and port setup in apache).

# Configure Assure Connection

  1. Log into the Assure Application and navigate to the System Config Section.
  2. Go to the API PSKs Tab and create a new API Pre-Shared Key.
    1. Make a note of the PSK created as it will be used in the ACE configuration.
  3. Go to the API IP Whitelist and create a whitelist for the ACE App (use the public IP or domain that is used in the Apache vhost config).
  4. Enable ACE Module
    1. Go to System configuration
    2. Master Config -> Serials
    3. Click on Edit in the top right hand corner
    4. Then click the key icon beside ACE Module
    5. When popup screen is visible,
      1. Select date Module should be disabled / Expire
      2. select the modules you would like to enable for ACE
      3. Click Submit

# Configure ACE

  1. Navigate to the folder that ACE was cloned to.

  2. Copy the .env.example file and then paste and rename it to .env.

  3. Within the .env file:

    1. Locate the variable called MIX_API_BASE_URL and add the IP or domain of the Assure Application that the ACE App will be linked to. Example:

      MIX_API_BASE_URL="201.111.11.11"
      
    2. Locate the variable called MIX_PSK and add the PSK that was created within Assure here. Example:

      MIX_PSK="d4039lksdjf03420934iup"
      
    3. Locate the variable called APP_ENV and change the value to production.

    4. Locate the variable called APP_DEBUG and change the value to false.

  4. Modify composer.json file in the root folder of ACE

    NOTE

    If you are running application on Windows you may run into an issue when you try to generate a key using the artisan command. To overcome this issue simple add the following to your composer.json file. Add the following in the config object

    "platform": {
        "ext-pcntl": "8.0",
        "ext-posix": "8.0"
    }
    

    When you are done it should look like something like this:


     
     
     
     





    "config": {
        "platform": {
            "ext-pcntl": "8.0",
            "ext-posix": "8.0"
        },
        "optimize-autoloader": true,
        "prefferred-install": "dist",
        "sort-packages": true
    }
    
  5. Run the following commands one after each other:

    composer install
    php artisan key:generate
    npm ci
    npm run dev
    
  6. Once all are completed without an issue, verify that the application is up and running within the browser.