-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_setup.sh
41 lines (32 loc) · 1.01 KB
/
_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Install dependencies
sudo apt update
sudo apt install python3-pip git unzip dos2unix -y
# Create and activate the virtual environment
if [ ! -d "CryptoCompta" ]; then
virtualenv CryptoCompta
fi
source CryptoCompta/bin/activate
echo "Virtual environment 'CryptoCompta' is activated. You can now run your commands." \
# Install Python requirements (uncomment if requirements.txt exists)
# if [ -f "requirements.txt" ]; then
# pip install -r requirements.txt
# fi
# Install AWS CLI
if [ ! -d "aws" ]; then
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip
sudo ./aws/install
rm awscliv2.zip
fi
dos2unix ./install_scripts/install_terraform.sh
cd aws
# Initialize Terraform (ensure terraform is installed)
if command -v terraform >/dev/null 2>&1; then
terraform init
terraform plan -out=tfplan
terraform validate
terraform apply -auto-approve tfplan
else
echo "Terraform is not installed. Please install Terraform and re-run the script."
fi