This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the vagrant template to allow adding interface
Including motd for network interface display IP Provide suse vm guest setting to allow faster startup time. Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
- Loading branch information
1 parent
cb8898d
commit dacc1e5
Showing
10 changed files
with
97 additions
and
12 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
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 was deleted.
Oops, something went wrong.
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,20 @@ | ||
_ _ | ||
/ \ __ _ _ _ __ _ _ __ (_) _ _ _ __ ___ | ||
/ _ \ / _` || | | | / _` || '__|| || | | || '_ ` _ \ | ||
/ ___ \| (_| || |_| || (_| || | | || |_| || | | | | | | ||
/_/ \_\\__, | \__,_| \__,_||_| |_| \__,_||_| |_| |_| | ||
|_| | ||
This is a ceph Appliance System [Aquarium] OS base on openSUSE. | ||
The webservice is running on | ||
|
||
<<network interfaces>> | ||
|
||
port 1337 | ||
|
||
|
||
To upgrade your system call: | ||
|
||
zypper refresh | ||
zypper dup | ||
|
||
Have a lot of fun... |
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,15 @@ | ||
#!/bin/sh | ||
|
||
|
||
|
||
INTERFACES=`ip addr| awk '/.*: .*: / {print $2}'` | ||
|
||
for i in $INTERFACES; do | ||
|
||
LINE="$LINE$i\\t`ip addr show $i | grep "inet " | awk '{gsub(/\//,"\\\/")} 1 {print $2}'`\n" | ||
|
||
done | ||
|
||
sed 's/<<network interfaces>>/'"$LINE"'/' /etc/motd.template > /etc/motd | ||
|
||
exit 0 |
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,2 @@ | ||
Welcome to Aquarium - Kernel \r (\l). | ||
|
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,5 @@ | ||
[Link] | ||
NamePolicy=mac | ||
MACAddressPolicy=persistent | ||
[Match] | ||
OriginalName=* |
10 changes: 10 additions & 0 deletions
10
images/microOS/root/usr/lib/systemd/system/update_motd.service
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,10 @@ | ||
[Unit] | ||
Description=Update motd with current network configuration | ||
After=network.target | ||
|
||
[Service] | ||
User=root | ||
ExecStart=/usr/bin/update_motd.sh | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,40 @@ | ||
# -*- mode: ruby -*- | ||
# vim: set ft=ruby | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.box = "{BOXNAME}" | ||
# The nfs server on Leap has udp enabled by default, but not on Tumbleweed | ||
# Disable udp to make it working for any host system by default. | ||
config.vm.synced_folder "{ROOTDIR}", "/srv/aquarium", type: "nfs", nfs_udp: false | ||
config.vm.synced_folder ".", "/vagrant", disabled: true | ||
config.vm.network "forwarded_port", guest: 1337, host: 1337, host_ip: "*" | ||
config.vm.network "private_network", type: "dhcp", auto_config: false | ||
config.vm.guest = "suse" | ||
|
||
config.vm.define :"node01", primary: true do |node| | ||
node.vm.hostname = "node01" | ||
|
||
node.vm.provider "libvirt" do |lv| | ||
lv.memory = 4096 | ||
lv.cpus = 1 | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "01123456" | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "01789101" | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "01112131" | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "01415161" | ||
end | ||
end | ||
|
||
config.vm.define :"node02" do |node| | ||
node.vm.hostname = "node02" | ||
node.vm.network "forwarded_port", guest: 1337, host: 1338, host_ip: "*" | ||
|
||
node.vm.provider "libvirt" do |lv| | ||
lv.memory = 4096 | ||
lv.cpus = 1 | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "02123456" | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "02789101" | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "02112131" | ||
lv.storage :file, size: "8G", type: "qcow2", serial: "02415161" | ||
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