Skip to content

valentimarco/Tesi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing??

Install

Setup Local-VMs

  1. Create a ssh-key using ed25519 and name id_ed25519_lab. Put it on ./.ssh!
  2. Add to ssh-agent
eval `ssh-agent`
ssh-add ./.ssh/id_ed25519_lab
  1. Execute the playbook with:
ansible-galaxy collection install -r ansible/requirements.yml && \
ansible-playbook -v -K ansible/playbook.yml

Setup AWS-EC2

  1. create password with
openssl rand -base64 2048 > ansible/vault.pass
  1. create vault for aws keys
ansible-vault create ansible/pass.yml --vault-password-file vault.pass
  1. Add keys:
---
ec2_access_key: "YOUR_AWS_ACCESS_KEY"
ec2_secret_key: "YOUR_AWS_SECRET_KEY"
  1. Execute the playbook:
ansible-galaxy collection install -r ansible/requirements.yml && \
ansible-playbook -v -K ansible/playbook-aws.yml --vault-password-file ansible/vault.pass

Setup k3s

  1. Install kubectx, k9s, kubectl in your machine
  2. Run ./k3s/set-kubeconfig.sh script by passing <CUSTOM_CLUSTER_NAME> and of the master vm.
  3. in the f43-dev-mqtt-master cluster controller:
    1. install Rabbitmq cluster operator kubectl apply -f "https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml"
    2. install rabbitmq kubectl apply -f ./k3s/mqtt/k8s-deployment.yml
  4. In the f43-dev-master cluster controller:
    1. install influxdb kubectl apply -f ./k3s/cloud/k8s-influxdb.yaml
    2. install redis kubectl apply -f ./k3s/data_processing/k8s-redis.yaml
    3. (optional if ci/cd doesn't work) clone the repo, compile the image and use podman save localhost/edge:latest | k3s ctr images import - to save it to k3s registry
    4. install grafana and prometheus kubectl apply -f ./k3s/minitoring/k8s-prometheus.yaml kubectl apply -f ./k3s/minitoring/k8s-grafana.yaml
    5. install the microservice kubectl apply -f ./k3s/data_processing/k8s-edge.yaml

Resource used to produce this:

links

Books and Papers

@book{book:{99010117},
   title =     {Ansible for DevOps: Server and configuration management for humans},
   author =    {Jeff Geerling},
   publisher = {Midwestern Mac, LLC},
   isbn =      {098639341X; 9780986393419},
   year =      {2015},
   edition =   {9},
   url =       {https://www.jeffgeerling.com/project/ansible-devops}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors