Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ohpc_vagrant
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
John-Paul Robinson
ohpc_vagrant
Commits
63866d22
Commit
63866d22
authored
6 years ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into feat-change-vagrant-box-to-pristine-centos
parents
4102bda8
b3e0d494
No related branches found
Branches containing commit
No related tags found
1 merge request
!12
Feat change vagrant box to pristine centos
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Vagrantfile
+16
-2
16 additions, 2 deletions
Vagrantfile
with
16 additions
and
2 deletions
Vagrantfile
+
16
−
2
View file @
63866d22
...
...
@@ -3,6 +3,9 @@
Vagrant
.
configure
(
"2"
)
do
|
config
|
# don't configure host-specific keys, config will use the user's key
config
.
ssh
.
insert_key
=
false
config
.
vm
.
define
"ohpc"
do
|
ohpc
|
ohpc
.
vm
.
box
=
"centos/7"
ohpc
.
vm
.
hostname
=
"ohpc"
...
...
@@ -20,19 +23,30 @@ Vagrant.configure("2") do |config|
auto_correct:
true
end
config
.
vm
.
provider
:virtualbox
do
|
vb
|
vb
.
customize
[
"modifyvm"
,
:id
,
"--natdnshostresolver1"
,
"on"
]
vb
.
memory
=
"2048"
end
# define user's key and insecure default
# insecure default is required for initial provisioning
config
.
ssh
.
private_key_path
=
[
"~/.ssh/id_rsa"
,
"~/.vagrant.d/insecure_private_key"
]
# append user's key to vagrant config to avoid overwrite of existing authorized_keys
# https://stackoverflow.com/a/31153912/8928529
config
.
vm
.
provision
"ssh_pub_key"
,
type:
"shell"
do
|
s
|
ssh_pub_key
=
File
.
readlines
(
"
#{
Dir
.
home
}
/.ssh/id_rsa.pub"
).
first
.
strip
s
.
inline
=
<<-
SHELL
echo
#{
ssh_pub_key
}
>> /home/vagrant/.ssh/authorized_keys
SHELL
end
config
.
vm
.
provision
"shell"
,
inline:
<<-
SHELL
if [ -f /vagrant/localenv.sh ]; then
. /vagrant/localenv.sh
fi
yum install -y ansible git vim bash-completion
ansible-playbook -c local -i /vagrant/CRI_XCBC/hosts -l `hostname` /vagrant/CRI_XCBC/site.yaml
ansible-playbook -c local -i /vagrant/CRI_XCBC/hosts -l `hostname` /vagrant/CRI_XCBC/site.yaml
-b
SHELL
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment