Before repacking the box we have to zero out the underlying drive to achieve better compression. Now if everything goes well installation is successful. Switch as a Postgres user and type psql to connect to the shell. $ sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt//pgdg.list' I want to install PostgreSQL on this virtual machine and rebox it. $ sudo sed -i "/^*PasswordAuthentication]no/c\PasswordAuthentication yes" /etc/ssh/sshd_configĤ. Connect to the guest virtual machine using: $ vagrant sshĮnable password-based authentication if needed, by default it is disabled. Bring up the virtual machine by running the vagrant init command. Create a new directory and run the vagrant init command. In my case, I am downloading the ubuntu/focal64 box. This is quite easy compared to building the box from scratch. Alternatively, you can download boxes already available in the vagrant cloud, customize them according to your requirement, and repack it to box format. You can choose any hypervisor and manually install guest os and harden the os then package it to box format. Here there are two ways you can create a vagrant box. You can also create your box like the one mentioned and share it with the community or fellow geeks working with you on the same project. Some boxes are preconfigured to serve different purposes like the scotch box which comes with a LAMP stack, trusty64cdh which comes with a single node CDH Hadoop distribution. Till now you are using prebuilt vagrant boxes downloaded from the vagrant cloud site. We have crossed halfway through this series and by this time you might have a good understanding of what Vagrant does and how to use provisioners in vagrant.
0 Comments
Leave a Reply. |