Created
January 22, 2015 03:00
-
-
Save smile-0yen/4534aaaad00ac2e1dbeb to your computer and use it in GitHub Desktop.
CentOS Atomic HostをVagrant Box化してみた ref: http://qiita.com/smile-0yen/items/07ec2b30c6a4c0832e48
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
$ sudo useradd 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
$ sudo usermod -G adm,wheel,systemd-journal 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
$ sudo docker version | |
Client version: 1.4.1 | |
Client API version: 1.16 | |
Go version (client): go1.3.3 | |
Git commit (client): 5bc2ff8/1.4.1 | |
OS/Arch (client): linux/amd64 | |
Server version: 1.4.1 | |
Server API version: 1.16 | |
Go version (server): go1.3.3 | |
Git commit (server): 5bc2ff8/1.4.1 |
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
$ kube-controller-manager -version | |
Kubernetes v0.7.0-18-g52e165a4fd720d |
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
$ rpm -qa | grep cockpit | |
cockpit-0.27-1.el7.centos.x86_64 | |
cockpit-assets-0.27-1.el7.centos.noarch |
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
$ vagrant login | |
$ vagrant box add --insecure smile-0yen/centos7atomic | |
$ vagrant box list # 確認 | |
smile-0yen/centos7atomic (virtualbox, 0.1) (virtualbox, 0.1) |
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
$ sudo -u vagrant mkdir /home/vagrant/.ssh/ | |
$ sudo -u vagrant chmod 700 /home/vagrant/.ssh |
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
/home/vagrant/.ssh/authorized_keys |
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
$ sudo visudo |
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
Defaults:vagrant !requiretty | |
vagrant ALL=(ALL) NOPASSWD:ALL | |
%vagrant ALL=(ALL) NOPASSWD:ALL |
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
$ vagrant package --base centos7atomic | |
==> centos7atomic: Exporting VM... | |
==> centos7atomic: Compressing package to: /hoge/package.box |
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
$ vagrant box add package.box --name centos7atomic |
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
Vagrant.require_version ">= 1.6.3", "< 1.9.9" | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.boot_timeout = 60 | |
# box add済みなのでconfig.vm.box_urlは不要 | |
config.vm.box = "centos7atomic" | |
# 共有フォルダは設定しない。 | |
config.vm.synced_folder ".", "/vagrant", disabled: true | |
config.vm.post_up_message = "Welcome to CentOS 7 Atomis Host" | |
config.vm.network "forwarded_port", guest: 8080, host: 9000 | |
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
$ vagrant up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment