-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from gpproton/dev
Merge pending linux changes
- Loading branch information
Showing
8 changed files
with
114 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.env | ||
.vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
default_box = 'generic/alma9' | ||
timeout = 1200 | ||
nodes = [ | ||
{ :hostname => 'alma-linux', :ip => '10.10.0.10', :box => default_box, :ram => 512, :cpus => 1 } | ||
] | ||
|
||
Vagrant.configure("2") do |config| | ||
nodes.each do |node| | ||
config.vm.define node[:hostname] do |nodeconfig| | ||
nodeconfig.vm.boot_timeout = timeout | ||
nodeconfig.vm.box = node[:box] ? node[:box] : default_box | ||
nodeconfig.vm.hostname = node[:hostname] + ".shell-assist" | ||
nodeconfig.vm.network :private_network, ip: node[:ip] | ||
nodeconfig.vm.provider :libvirt do |vb| | ||
vb.memory = node[:ram] | ||
vb.cpus = node[:cpus] | ||
end | ||
memory = node[:ram] | ||
nodeconfig.vm.provider :virtualbox do |vb| | ||
vb.name = node[:hostname] | ||
vb.linked_clone = true | ||
vb.memory = node[:ram] | ||
vb.cpus = node[:cpus] | ||
vb.customize [ | ||
"modifyvm", :id, | ||
"--cpuexecutioncap", "50", | ||
"--memory", memory.to_s, | ||
] | ||
end | ||
nodeconfig.vm.provision :shell, inline: <<-SHELL | ||
fi_username=vagrant | ||
fi_password=vagrant | ||
echo 'initializing...' | ||
sleep 5 | ||
echo 'setting default password...' | ||
usermod --password $(echo $fi_password | openssl passwd -1 -stdin) $fi_username | ||
echo 'enabling password auth ...' | ||
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config | ||
echo "restarting ssh service.." | ||
systemctl restart sshd | ||
rm -rf /tmp/* | ||
SHELL | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters