Skip to content

Commit

Permalink
fedora support
Browse files Browse the repository at this point in the history
pending: install guide

issue #20
  • Loading branch information
joenio committed Mar 25, 2017
1 parent eb837f5 commit 1315eaa
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Supported GNU/Linux distributions:
* Xenial
* Archlinux
* openSUSE
* Fedora
* Fedora 24
* Fedora 25

## sudo

Expand Down Expand Up @@ -96,6 +99,10 @@ or:

if you want the bleeding edge version.

## Installing in Fedora

(pending)

## Using

The `holodev` script creates Linux Containers using the current directory plus the `git branch` to compose the container name, it covers the scenario where, for each project (directory), there is a Linux Container, so that it is not necessary to install development dependecies to your system.
Expand Down
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
xenial: 'ubuntu/xenial32',
archlinux: 'terrywang/archlinux',
opensuse: 'opensuse/openSUSE-42.1-x86_64',
fedora: 'fedora/25-cloud-base',
}.each do |release, box|
config.vm.define release do |machine|
machine.vm.box = box
Expand Down
2 changes: 2 additions & 0 deletions development-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ elif [ -f /etc/arch-release ]; then
OS=Arch
elif [ -f /etc/SuSE-release ]; then
OS=Suse
elif [ -f /etc/fedora-release ]; then
OS=Fedora
else
OS=$(uname -s)
fi
Expand Down
26 changes: 26 additions & 0 deletions development-setup/Fedora.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# avoid routing (DUP!) error when ping some HOST
route add default gw 10.0.2.2

dnf --best --allowerasing --assumeyes install \
bash-completion \
bridge-utils \
debootstrap \
dnsmasq \
ebtables \
git \
libvirt \
lxc \
shunit2 \
sudo \
which \
make \
lxc-templates \
gnupg \
xinetd

echo 'PATH=$PATH:/usr/share/shunit2' > /etc/profile.d/shunit2.sh
echo 'export PATH' >> /etc/profile.d/shunit2.sh
source /etc/profile.d/shunit2.sh

systemctl start libvirtd
systemctl enable libvirtd
22 changes: 19 additions & 3 deletions holodev
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ elif [ -f /etc/arch-release ]; then
OS=Arch
elif [ -f /etc/SuSE-release ]; then
OS=Suse
elif [ -f /etc/fedora-release ]; then
OS=Fedora
else
OS=$(uname -s)
fi
Expand Down Expand Up @@ -267,6 +269,14 @@ setup_libvirt_Arch() {
setup_libvirt_Debian
}

setup_libvirt_Linux() {
setup_libvirt_Debian
}

setup_libvirt_Fedora() {
setup_libvirt_Debian
}

create_xinetd_config_file() {
local FILENAME=/tmp/holodev-$CONTAINER_NAME.xinetd
CONTAINER_IP=$(do_info | grep 'IP:' | awk '{print $2}')
Expand Down Expand Up @@ -395,9 +405,15 @@ up_network() {
if [ $SYSTEMD_IS_ACTIVE ]; then
info "waiting the system be operational"
IS_SYSTEM_RUNNING=$(lxc_attach systemctl is-system-running)
while ! echo $IS_SYSTEM_RUNNING | grep -q -e 'degraded' -e 'running'; do
sleep 1s
IS_SYSTEM_RUNNING=$(lxc_attach systemctl is-system-running)
RETRY=5
while [ $RETRY -gt 0 ]; do
if ! echo $IS_SYSTEM_RUNNING | grep -q -e 'degraded' -e 'running'; then
sleep 2s
IS_SYSTEM_RUNNING=$(lxc_attach systemctl is-system-running)
RETRY=$(echo "$RETRY - 1" | bc)
else
RETRY=0
fi
done
lxc_attach systemctl enable systemd-networkd.service
lxc_attach systemctl start systemd-networkd.service
Expand Down

0 comments on commit 1315eaa

Please sign in to comment.