AhmadRafiee / DevOps_Certification

DevOps training with DockerMe
Apache License 2.0
150 stars 34 forks source link

vagrant-and-packer.md NEEDS TO BE UPDATED. #6

Open iampaarsaa opened 7 months ago

iampaarsaa commented 7 months ago

Vagrant & Packer

Source: Vagrant Official Docs. https://developer.hashicorp.com/vagrant/install#Linux

Step 1:

wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg

Step 2:

echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list

Step 3:

For Vagrant:

sudo apt update && sudo apt install vagrant

For Packer:

sudo apt update && sudo apt install packer

Packer / Bento

Source: Bento Official Repo. - README https://github.com/chef/bento/blob/main/README.md#using-packer

Step 1:

git clone https://github.com/chef/bento.git

Step 2:

<path/to> Is Wherever You Cloned Bento Repository.

cd <path/to>/bento

Step 3:

This Might Take Several Minutes, Wait ...

packer init -upgrade ./packer_templates

Step 4:

This Might Take Several Minutes, Wait ...

packer build -only=virtualbox-iso.vm -var-file=os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl ./packer_templates
hosseinfaraji8079 commented 3 months ago

tnx