Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
41b10c6e
Commit
41b10c6e
authored
Jun 26, 2014
by
Han Su Kim
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1244 from edx/han/Vagrantfile
Vagrantfiles for Johnnycake
parents
490786b1
f1684a55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
20 deletions
+60
-20
vagrant/base/devstack/Vagrantfile
+32
-7
vagrant/release/devstack/Vagrantfile
+25
-10
vagrant/release/fullstack/Vagrantfile
+3
-3
No files found.
vagrant/base/devstack/Vagrantfile
View file @
41b10c6e
Vagrant
.
require_version
">= 1.5.3"
unless
Vagrant
.
has_plugin?
(
"vagrant-vbguest"
)
raise
"Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`"
end
VAGRANTFILE_API_VERSION
=
"2"
...
...
@@ -6,18 +9,19 @@ MEMORY = 2048
CPU_COUNT
=
2
edx_platform_mount_dir
=
"edx-platform"
themes_mount_dir
=
"themes"
forum_mount_dir
=
"cs_comments_service"
ora_mount_dir
=
"ora"
if
ENV
[
'VAGRANT_MOUNT_BASE'
]
edx_platform_mount_dir
=
ENV
[
'VAGRANT_MOUNT_BASE'
]
+
"/"
+
edx_platform_mount_dir
themes_mount_dir
=
ENV
[
'VAGRANT_MOUNT_BASE'
]
+
"/"
+
themes_mount_dir
forum_mount_dir
=
ENV
[
'VAGRANT_MOUNT_BASE'
]
+
"/"
+
forum_mount_dir
ora_mount_dir
=
ENV
[
'VAGRANT_MOUNT_BASE'
]
+
"/"
+
ora_mount_dir
end
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
# Creates a devstack from a base Ubuntu 12.04 image for virtualbox
...
...
@@ -33,15 +37,33 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config
.
ssh
.
insert_key
=
true
config
.
vm
.
synced_folder
"."
,
"/vagrant"
,
disabled:
true
config
.
vm
.
synced_folder
"
#{
edx_platform_mount_dir
}
"
,
"/edx/app/edxapp/edx-platform"
,
:create
=>
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
forum_mount_dir
}
"
,
"/edx/app/forum/cs_comments_service"
,
:create
=>
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
ora_mount_dir
}
"
,
"/edx/app/ora/ora"
,
:create
=>
true
,
nfs:
true
# Enable X11 forwarding so we can interact with GUI applications
# Enable X11 forwarding so we can interact with GUI applications
if
ENV
[
'VAGRANT_X11'
]
config
.
ssh
.
forward_x11
=
true
config
.
ssh
.
forward_x11
=
true
end
if
ENV
[
'VAGRANT_USE_VBOXFS'
]
==
'true'
config
.
vm
.
synced_folder
"
#{
edx_platform_mount_dir
}
"
,
"/edx/app/edxapp/edx-platform"
,
create:
true
,
owner:
"edxapp"
,
group:
"www-data"
config
.
vm
.
synced_folder
"
#{
themes_mount_dir
}
"
,
"/edx/app/edxapp/themes"
,
create:
true
,
owner:
"edxapp"
,
group:
"www-data"
config
.
vm
.
synced_folder
"
#{
forum_mount_dir
}
"
,
"/edx/app/forum/cs_comments_service"
,
create:
true
,
owner:
"forum"
,
group:
"www-data"
config
.
vm
.
synced_folder
"
#{
ora_mount_dir
}
"
,
"/edx/app/ora/ora"
,
create:
true
,
owner:
"ora"
,
group:
"www-data"
else
config
.
vm
.
synced_folder
"
#{
edx_platform_mount_dir
}
"
,
"/edx/app/edxapp/edx-platform"
,
create:
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
themes_mount_dir
}
"
,
"/edx/app/edxapp/themes"
,
create:
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
forum_mount_dir
}
"
,
"/edx/app/forum/cs_comments_service"
,
create:
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
ora_mount_dir
}
"
,
"/edx/app/ora/ora"
,
create:
true
,
nfs:
true
end
config
.
vm
.
provider
:virtualbox
do
|
vb
|
vb
.
customize
[
"modifyvm"
,
:id
,
"--memory"
,
MEMORY
.
to_s
]
vb
.
customize
[
"modifyvm"
,
:id
,
"--cpus"
,
CPU_COUNT
.
to_s
]
...
...
@@ -66,9 +88,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# See: https://github.com/mitchellh/vagrant/issues/1188
config
.
vm
.
provision
"shell"
,
inline:
'echo \'LC_ALL="en_US.UTF-8"\' > /etc/default/locale'
# Use vagrant-vbguest plugin to make sure Guest Additions are in sync
config
.
vbguest
.
auto_reboot
=
true
config
.
vbguest
.
auto_update
=
true
config
.
vm
.
provision
:ansible
do
|
ansible
|
ansible
.
playbook
=
"../../../playbooks/vagrant-devstack.yml"
ansible
.
verbose
=
"vvvv"
end
end
vagrant/release/devstack/Vagrantfile
View file @
41b10c6e
...
...
@@ -23,7 +23,7 @@ cd /edx/app/edx_ansible/edx_ansible/playbooks
# this can cause problems (e.g. looking for templates that no longer exist).
/edx/bin/update configuration release
ansible-playbook -i localhost, -c local vagrant-devstack.yml -e configuration_version=release
ansible-playbook -i localhost, -c local vagrant-devstack.yml -
-tags=deploy -
e configuration_version=release
SCRIPT
edx_platform_mount_dir
=
"edx-platform"
...
...
@@ -43,9 +43,8 @@ end
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
# Creates an edX devstack VM from an official release
config
.
vm
.
box
=
"injera-devstack"
config
.
vm
.
synced_folder
"."
,
"/vagrant"
,
disabled:
true
config
.
vm
.
box_url
=
"http://files.edx.org/vagrant-images/20140418-injera-devstack.box"
config
.
vm
.
box
=
"johnnycake-devstack"
config
.
vm
.
box_url
=
"http://files.edx.org/vagrant-images/20140625-johnnycake-devstack.box"
config
.
vm
.
network
:private_network
,
ip:
"192.168.33.10"
config
.
vm
.
network
:forwarded_port
,
guest:
8000
,
host:
8000
...
...
@@ -55,15 +54,32 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config
.
vm
.
network
:forwarded_port
,
guest:
9200
,
host:
9200
config
.
ssh
.
insert_key
=
true
config
.
vm
.
synced_folder
"."
,
"/vagrant"
,
disabled:
true
# Enable X11 forwarding so we can interact with GUI applications
if
ENV
[
'VAGRANT_X11'
]
config
.
ssh
.
forward_x11
=
true
config
.
ssh
.
forward_x11
=
true
end
config
.
vm
.
synced_folder
"
#{
edx_platform_mount_dir
}
"
,
"/edx/app/edxapp/edx-platform"
,
:create
=>
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
themes_mount_dir
}
"
,
"/edx/app/edxapp/themes"
,
:create
=>
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
forum_mount_dir
}
"
,
"/edx/app/forum/cs_comments_service"
,
:create
=>
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
ora_mount_dir
}
"
,
"/edx/app/ora/ora"
,
:create
=>
true
,
nfs:
true
if
ENV
[
'VAGRANT_USE_VBOXFS'
]
==
'true'
config
.
vm
.
synced_folder
"
#{
edx_platform_mount_dir
}
"
,
"/edx/app/edxapp/edx-platform"
,
create:
true
,
owner:
"edxapp"
,
group:
"www-data"
config
.
vm
.
synced_folder
"
#{
themes_mount_dir
}
"
,
"/edx/app/edxapp/themes"
,
create:
true
,
owner:
"edxapp"
,
group:
"www-data"
config
.
vm
.
synced_folder
"
#{
forum_mount_dir
}
"
,
"/edx/app/forum/cs_comments_service"
,
create:
true
,
owner:
"forum"
,
group:
"www-data"
config
.
vm
.
synced_folder
"
#{
ora_mount_dir
}
"
,
"/edx/app/ora/ora"
,
create:
true
,
owner:
"ora"
,
group:
"www-data"
else
config
.
vm
.
synced_folder
"
#{
edx_platform_mount_dir
}
"
,
"/edx/app/edxapp/edx-platform"
,
create:
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
themes_mount_dir
}
"
,
"/edx/app/edxapp/themes"
,
create:
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
forum_mount_dir
}
"
,
"/edx/app/forum/cs_comments_service"
,
create:
true
,
nfs:
true
config
.
vm
.
synced_folder
"
#{
ora_mount_dir
}
"
,
"/edx/app/ora/ora"
,
create:
true
,
nfs:
true
end
config
.
vm
.
provider
:virtualbox
do
|
vb
|
vb
.
customize
[
"modifyvm"
,
:id
,
"--memory"
,
MEMORY
.
to_s
]
...
...
@@ -90,5 +106,4 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Assume that the base box has the edx_ansible role installed
# We can then tell the Vagrant instance to update itself.
config
.
vm
.
provision
"shell"
,
inline:
$script
end
vagrant/release/fullstack/Vagrantfile
View file @
41b10c6e
...
...
@@ -8,8 +8,8 @@ CPU_COUNT = 2
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
# Creates an edX fullstack VM from an official release
config
.
vm
.
box
=
"
injera
-fullstack"
config
.
vm
.
box_url
=
"http://files.edx.org/vagrant-images/20140
418-injera
-fullstack.box"
config
.
vm
.
box
=
"
johnnycake
-fullstack"
config
.
vm
.
box_url
=
"http://files.edx.org/vagrant-images/20140
625-johnnycake
-fullstack.box"
config
.
vm
.
synced_folder
"."
,
"/vagrant"
,
disabled:
true
config
.
ssh
.
insert_key
=
true
...
...
@@ -25,7 +25,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb
.
customize
[
"modifyvm"
,
:id
,
"--natdnshostresolver1"
,
"on"
]
end
[
"vmware_fusion"
,
"vmware_workstation"
].
each
do
|
vmware_provider
|
config
.
vm
.
provider
vmware_provider
do
|
v
,
override
|
override
.
vm
.
box
=
"injera-fullstack-vmware"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment