-
Notifications
You must be signed in to change notification settings - Fork 8
Deployment
debifrank edited this page Sep 28, 2022
·
1 revision
This installation guide has been tested on fresh installs of Ubuntu 18.04 and 20.04.
ETM is written with .NET Core, and is designed to run on Linux systems. ETM also is designed to work within Docker containers.
sudo apt updatesudo apt upgrade
sudo apt install vim
sudo apt install git
sudo apt install dos2unix
sudo apt updatesudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-commoncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"sudo apt updatesudo apt install docker-ce docker-ce-cli containerd.io docker-compose
- /var/matrix
- /var/matrix/app
- /var/matrix/mongo
- /var/matrix/mongo/db
- /var/matrix/mongo/configdb
cd /var/matrix/appgit clone https://github.com/blacklanternsecurity/enter_the_matrix.git
- Change the following line to a unique password (alphanumeric)
- MONGO_INITDB_ROOT_PASSWORD=CHANGEMESUCKAH
cd /var/matrix/app/enter_the_matrixvim appsettings.json- Alter the ConnectionString to use your password for the MongoDB container
- Replace the "Ldap" fields with your LDAP configuration
- Replace the "LocalAuthSettings" with your desired administrative account credentials
cd /var/matrix/app/enter_the_matrix/Servicesvim LdapAuthenticationService.cs- Alter line
61and replaceOU=YOURORG,DC=REPLACEME,DC=ANDMEwith the appropriate information for your organization
- Place your SSL certificate at
/var/matrix/app/enter_the_matrix/matrix.cer - Place your SSL key at
/var/matrix/app/enter_the_matrix/matrix.key - To create your own self-signed certificate and key:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout matrix.key -out matrix.cer
- Alter
enter_the_matrix.confand replaceYOURDOMAINwith your domain if you are using one
For whatever reason the nginx configuration does not play nicely coming from a Windows development environment even when specifically telling GIT to convert to LF end-of-line format. So, do the following:
dos2unix /var/matrix/app/enter_the_matrix/enter_the_matrix.conf
If you are using Ubuntu 18.04:
wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
Ubuntu 20.04:
-
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -
sudo dpkg -i packages-microsoft-prod.deb -
sudo apt-get install -y apt-transport-https -
sudo apt-get update -
sudo apt-get install -y dotnet-sdk-5.0
sudo cd /var/matrix/app/enter_the_matrixsudo dotnet publish --configuration Release
cd /var/matrix/app/enter_the_matrixdocker-compose up -d