This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 886
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation/vagrant: use rkt binary for getting started
Currently to get started with rkt we recommend using "vagrant up". This tries to build rkt inside a virtual machine. This cleans up the install-vagrant.sh script to use a released version of rkt instead. It also removes scripts not being used any more. Fixes #2789
- Loading branch information
1 parent
af7ffb3
commit f0bed3d
Showing
9 changed files
with
152 additions
and
191 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 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
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,19 +1,19 @@ | ||
Vagrant.configure('2') do |config| | ||
# grab Ubuntu 15.10 official image | ||
config.vm.box = "ubuntu/wily64" # Ubuntu 15.10 | ||
config.vm.box = "ubuntu/xenial64" # Ubuntu 16.04 | ||
|
||
# fix issues with slow dns http://serverfault.com/a/595010 | ||
config.vm.provider :virtualbox do |vb, override| | ||
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | ||
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | ||
# add more ram, the default isn't enough for the build | ||
vb.customize ["modifyvm", :id, "--memory", "1024"] | ||
end | ||
|
||
config.vm.provider :libvirt do |libvirt, override| | ||
libvirt.memory = 1024 | ||
end | ||
|
||
config.vm.synced_folder ".", "/vagrant", type: "rsync" | ||
config.vm.provision :shell, :privileged => true, :path => "scripts/install-vagrant.sh" | ||
config.vm.network "private_network", type: "dhcp" | ||
config.vm.provision :shell, :privileged => true, :path => "scripts/install-rkt.sh" | ||
config.vm.provision :shell, :inline => "usermod -a -G rkt-admin ubuntu" | ||
config.vm.provision :shell, :inline => "usermod -a -G rkt ubuntu" | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,65 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
cd $(mktemp -d) | ||
|
||
version="1.8.0" | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
gnupg2 \ | ||
bash-completion \ | ||
checkinstall | ||
|
||
curl -sSL https://coreos.com/dist/pubkeys/app-signing-pubkey.gpg | gpg2 --import - | ||
key=$(gpg2 --with-colons --keyid-format LONG -k security@coreos.com | egrep ^pub | cut -d ':' -f5) | ||
|
||
wget --progress=bar:force https://github.com/coreos/rkt/releases/download/v"${version}"/rkt-v"${version}".tar.gz | ||
wget --progress=bar:force https://github.com/coreos/rkt/releases/download/v"${version}"/rkt-v"${version}".tar.gz.asc | ||
gpg2 --trusted-key "${key}" --verify-files *.asc | ||
|
||
tar xvzf rkt-v"${version}".tar.gz | ||
|
||
cat <<EOF >install-pak | ||
#!/bin/bash | ||
for flavor in fly coreos kvm; do | ||
install -Dm644 rkt-v${version}/stage1-\${flavor}.aci /usr/lib/rkt/stage1-images/stage1-\${flavor}.aci | ||
done | ||
install -Dm755 rkt-v${version}/rkt /usr/bin/rkt | ||
for f in rkt-v${version}/manpages/*; do | ||
install -Dm644 "\${f}" "/usr/share/man/man1/\$(basename \$f)" | ||
done | ||
install -Dm644 rkt-v${version}/bash_completion/rkt.bash /usr/share/bash-completion/completions/rkt | ||
install -Dm644 rkt-v${version}/init/systemd/tmpfiles.d/rkt.conf /usr/lib/tmpfiles.d/rkt.conf | ||
for unit in rkt-gc.{timer,service} rkt-metadata.{socket,service}; do | ||
install -Dm644 rkt-v${version}/init/systemd/\$unit /usr/lib/systemd/system/\$unit | ||
done | ||
EOF | ||
chmod +x install-pak | ||
|
||
cat <<EOF >preinstall-pak | ||
#!/bin/sh | ||
groupadd --force --system rkt-admin | ||
groupadd --force --system rkt | ||
EOF | ||
chmod +x preinstall-pak | ||
|
||
cp rkt-v"${version}"/scripts/setup-data-dir.sh postinstall-pak | ||
chmod +x postinstall-pak | ||
|
||
cat <<EOF >>postinstall-pak | ||
systemctl daemon-reload | ||
systemd-tmpfiles --create /usr/lib/tmpfiles.d/rkt.conf | ||
EOF | ||
|
||
BUILDDIR=${BUILDDIR:-$PWD/build-rkt*} | ||
sudo cp -v $BUILDDIR/bin/* /usr/local/bin | ||
checkinstall -y --pkgname=rkt --pkgversion="${version}" ./install-pak |
Oops, something went wrong.