Last active
October 2, 2020 17:29
-
-
Save fareedfauzi/1c242548a3b2388b56b8ea92ec089e16 to your computer and use it in GitHub Desktop.
Script to install Assembly Line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo " | |
To install AssemblyLine you need to meet this requirements: | |
Any linux distribution with a recent kernel (4.4+) | |
4 Cores | |
8 GB of Ram | |
40 GB of disk space | |
" | |
read -p 'Meet the requirement? (y/n): ' yesno | |
if [[ $yesno == 'y' ]] | |
then | |
echo "Add Docker repository" | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
echo "Install Docker" | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
echo "Test Docker installation" | |
sudo docker run hello-world | |
echo "Install docker-compose" | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
echo "Test docker-compose installation" | |
docker-compose --version | |
echo "Download installation files to your home directory" | |
curl -L "https://assemblyline-support.s3.amazonaws.com/assemblyline4_beta_4.tar.gz" -o $HOME/assemblyline4_beta_4.tar.gz | |
echo "Extract installation files" | |
tar zxvf $HOME/assemblyline4_beta_4.tar.gz | |
echo "Configure system" | |
openssl req -nodes -x509 -newkey rsa:4096 -keyout $HOME/assemblyline4_beta_4/config/nginx.key -out $HOME/assemblyline4_beta_4/config/nginx.crt -days 365 -subj "/C=CA/ST=Ontario/L=Ottawa/O=CCCS/CN=assemblyline.local" | |
echo "Run docker_compose file" | |
cd $HOME/assemblyline4_beta_4/ | |
sudo docker-compose pull | |
sudo docker-compose up -d | |
echo "Install service" | |
sudo docker-compose -f bootstrap-compose.yaml pull | |
sudo docker-compose -f bootstrap-compose.yaml up -d | |
echo "Install Assembly Line client" | |
sudo apt-get update | |
sudo apt-get install python3.6 | |
sudo apt install python3-pip | |
pip3 install -U --pre assemblyline_client | |
echo "You're done now! Go to https://<IP_OF_YOUR_AL_INSTANCE> to use AssemblyLine" | |
echo "The default username and password is admin:admin" | |
echo "For more installation docs, please refer https://cybercentrecanada.github.io/assemblyline4_docs/docs/public_beta/install.html" | |
echo "Bye!" | |
else | |
echo "See you again!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment