-
Generate a new SSH keypair (if you don’t already have one) on your local machine or the VM where Terraform will run:
ssh-keygen -t ed25519
- Follow the prompts to specify a key name and, optionally, a passphrase.
-
Locate the public key:
- The public key (
.pub
) will be used for VM access viacloud-init
.
- The public key (
-
Use an existing key (if applicable):
- Ensure the public key you plan to use is accessible and correctly specified in your Terraform configuration.
- Navigate to the
cluster
folder:
cd cluster
- Edit the
variables.tf
file:- Update fields such as
namespace
,network_name
, andkeyname
to align with your specific environment and configuration.
- Update fields such as
- Prepare Terraform by initializing the working directory and downloading the required providers:
terraform init
- Create the virtual machines by executing the following command:
terraform apply
- Review the proposed changes and confirm the deployment when prompted.
- Make the script executable:
chmod +x generate_inventory.py
- Execute the playbook to set up the cluster environment using the inventory file:
ansible-playbook -i generate_inventory.py full.yaml
- Access the host machine.
- Clone the repository containing the pipeline setup:
https://github.com/tylersupersad/comp0235-cw.git
- Verify the
inventory.ini
file to ensure all IP addresses match their respective machines:
nano config/inventory.ini
- Navigate to the
playbooks
directory:
cd playbooks
- Execute the following tasks with a single playbook:
- Configure the mount point on the storage machine.
- Copy the necessary Python scripts and
requirements.txt
file to the mounted storage. - Install required dependencies on all worker machines.
ansible-playbook -i ../config/inventory.ini setup_and_deploy.yml
- Obtain the human and E. coli datasets by running:
ansible-playbook -i ../config/inventory.ini prepare_input_data.yml
- Run the following playbook to configure Merizo Search:
ansible-playbook -i ../config/inventory.ini merizo_setup.yml
- Execute the pipeline using:
ansible-playbook -i ../config/inventory.ini run_pipeline.yml