Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Very Demiurge Very Mindful
Kolla Ansible
Commits
bab6f2cf
Commit
bab6f2cf
authored
6 years ago
by
Zuul
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Set up the kolla-cli and inventory for the vagrant dev environment"
parents
cfbf907a
680c288b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/dev/vagrant/Vagrantfile
+2
-2
2 additions, 2 deletions
contrib/dev/vagrant/Vagrantfile
contrib/dev/vagrant/bootstrap.sh
+51
-6
51 additions, 6 deletions
contrib/dev/vagrant/bootstrap.sh
with
53 additions
and
8 deletions
contrib/dev/vagrant/Vagrantfile
+
2
−
2
View file @
bab6f2cf
...
@@ -232,7 +232,7 @@ Vagrant.configure(2) do |config|
...
@@ -232,7 +232,7 @@ Vagrant.configure(2) do |config|
# The operator controls the deployment
# The operator controls the deployment
config
.
vm
.
define
"operator"
,
primary:
true
do
|
admin
|
config
.
vm
.
define
"operator"
,
primary:
true
do
|
admin
|
admin
.
vm
.
hostname
=
"operator.local"
admin
.
vm
.
hostname
=
"operator.local"
admin
.
vm
.
provision
:shell
,
path:
PROVISION_SCRIPT
,
args:
"operator
#{
MULTINODE
?
'multinode'
:
'aio'
}
#{
kolla_path
}
#{
kolla_ansible_path
}
#{
kolla_cli_path
}
"
admin
.
vm
.
provision
:shell
,
path:
PROVISION_SCRIPT
,
args:
"operator
#{
MULTINODE
?
'multinode'
:
'aio'
}
#{
kolla_path
}
#{
kolla_ansible_path
}
#{
kolla_cli_path
}
#{
NUMBER_OF_COMPUTE_NODES
}
#{
NUMBER_OF_STORAGE_NODES
}
#{
NUMBER_OF_NETWORK_NODES
}
#{
NUMBER_OF_CONTROL_NODES
}
"
admin
.
vm
.
synced_folder
kolla_ansible_repo_path
,
kolla_ansible_path
,
create
:"True"
,
type:
get_default
(
:sync_method
)
admin
.
vm
.
synced_folder
kolla_ansible_repo_path
,
kolla_ansible_path
,
create
:"True"
,
type:
get_default
(
:sync_method
)
admin
.
vm
.
synced_folder
kolla_repo_path
,
kolla_path
,
create
:"True"
,
type:
get_default
(
:sync_method
)
admin
.
vm
.
synced_folder
kolla_repo_path
,
kolla_path
,
create
:"True"
,
type:
get_default
(
:sync_method
)
admin
.
vm
.
synced_folder
kolla_cli_repo_path
,
kolla_cli_path
,
create
:"True"
,
type:
get_default
(
:sync_method
)
admin
.
vm
.
synced_folder
kolla_cli_repo_path
,
kolla_cli_path
,
create
:"True"
,
type:
get_default
(
:sync_method
)
...
@@ -256,7 +256,7 @@ Vagrant.configure(2) do |config|
...
@@ -256,7 +256,7 @@ Vagrant.configure(2) do |config|
hostname
=
"
#{
node_type
}
0
#{
i
}
"
hostname
=
"
#{
node_type
}
0
#{
i
}
"
config
.
vm
.
define
hostname
do
|
node
|
config
.
vm
.
define
hostname
do
|
node
|
node
.
vm
.
hostname
=
"
#{
hostname
}
.local"
node
.
vm
.
hostname
=
"
#{
hostname
}
.local"
node
.
vm
.
provision
:shell
,
path:
PROVISION_SCRIPT
,
args:
"
#{
hostname
}
multinode
#{
kolla_path
}
#{
kolla_ansible_path
}
#{
kolla_cli_path
}
"
node
.
vm
.
provision
:shell
,
path:
PROVISION_SCRIPT
,
args:
"
#{
hostname
}
multinode
#{
kolla_path
}
#{
kolla_ansible_path
}
#{
kolla_cli_path
}
#{
NUMBER_OF_COMPUTE_NODES
}
#{
NUMBER_OF_STORAGE_NODES
}
#{
NUMBER_OF_NETWORK_NODES
}
#{
NUMBER_OF_CONTROL_NODES
}
"
node
.
vm
.
synced_folder
File
.
join
(
vagrant_dir
,
'storage'
,
node_type
),
"/data/host"
,
create
:"True"
,
type:
get_default
(
:sync_method
)
node
.
vm
.
synced_folder
File
.
join
(
vagrant_dir
,
'storage'
,
node_type
),
"/data/host"
,
create
:"True"
,
type:
get_default
(
:sync_method
)
node
.
vm
.
synced_folder
File
.
join
(
vagrant_dir
,
'storage'
,
'shared'
),
"/data/shared"
,
create
:"True"
,
type:
get_default
(
:sync_method
)
node
.
vm
.
synced_folder
File
.
join
(
vagrant_dir
,
'storage'
,
'shared'
),
"/data/shared"
,
create
:"True"
,
type:
get_default
(
:sync_method
)
node
.
vm
.
synced_folder
"."
,
vagrant_shared_folder
,
disabled:
true
node
.
vm
.
synced_folder
"."
,
vagrant_shared_folder
,
disabled:
true
...
...
This diff is collapsed.
Click to expand it.
contrib/dev/vagrant/bootstrap.sh
+
51
−
6
View file @
bab6f2cf
...
@@ -11,6 +11,10 @@ MODE=$2
...
@@ -11,6 +11,10 @@ MODE=$2
KOLLA_PATH
=
$3
KOLLA_PATH
=
$3
KOLLA_ANSIBLE_PATH
=
$4
KOLLA_ANSIBLE_PATH
=
$4
KOLLA_CLI_PATH
=
$5
KOLLA_CLI_PATH
=
$5
NUMBER_OF_COMPUTE_NODES
=
$6
NUMBER_OF_STORAGE_NODES
=
$7
NUMBER_OF_NETWORK_NODES
=
$8
NUMBER_OF_CONTROL_NODES
=
$9
export
http_proxy
=
export
http_proxy
=
export
https_proxy
=
export
https_proxy
=
...
@@ -151,14 +155,54 @@ function configure_kolla {
...
@@ -151,14 +155,54 @@ function configure_kolla {
# Use local docker registry
# Use local docker registry
sed
-i
-r
"s,^[# ]*namespace *=.+
$,
namespace =
${
REGISTRY
}
/lokolla,"
/etc/kolla/kolla-build.conf
sed
-i
-r
"s,^[# ]*namespace *=.+
$,
namespace =
${
REGISTRY
}
/lokolla,"
/etc/kolla/kolla-build.conf
sed
-i
-r
"s,^[# ]*push *=.+
$,
push = True,"
/etc/kolla/kolla-build.conf
sed
-i
-r
"s,^[# ]*push *=.+
$,
push = True,"
/etc/kolla/kolla-build.conf
sed
-i
-r
"s,^[# ]*docker_registry:.+
$,
docker_registry
:
\"
${
REGISTRY
}
\"
,"
/etc/kolla/globals.yml
kolla-cli property
set
docker_registry
${
REGISTRY
}
sed
-i
-r
"s,^[# ]*docker_namespace:.+
$,
docker_namespace
:
\"
lokolla
\"
,"
/etc/kolla/globals.yml
kolla-cli property
set
docker_namespace
lokolla
sed
-i
-r
"s,^[# ]*docker_insecure_registry:.+
$,
docker_insecure_registry:
\"
True
\"
,"
/etc/kolla/globals.yml
kolla-cli property
set
docker_insecure_registry True
# Set network interfaces
# Set network interfaces
sed
-i
-r
"s,^[# ]*network_interface:.+
$,
network_interface:
\"
eth1
\"
,"
/etc/kolla/globals.yml
kolla-cli property
set
network_interface eth1
sed
-i
-r
"s,^[# ]*neutron_external_interface:.+
$,
neutron_external_interface:
\"
eth2
\"
,"
/etc/kolla/globals.yml
kolla-cli property
set
neutron_external_interface eth2
# Set VIP address to be on the vagrant private network
# Set VIP address to be on the vagrant private network
sed
-i
-r
"s,^[# ]*kolla_internal_vip_address:.+
$,
kolla_internal_vip_address:
\"
172.28.128.254
\"
,"
/etc/kolla/globals.yml
kolla-cli property
set
kolla_internal_vip_address 172.28.128.254
}
function
configure_kolla_cli
{
# Run the CLI setup script
pushd
${
KOLLA_CLI_PATH
}
python ./cli_setup.py
popd
# Set up the kolla-cli inventory
if
[
"
$MODE
"
==
'aio'
]
;
then
kolla-cli setdeploy
local
kolla-cli host add localhost
for
group
in
control deployment monitoring network storage
;
do
kolla-cli group addhost
$group
localhost
done
else
for
node_num
in
$(
seq
1
${
NUMBER_OF_COMPUTE_NODES
}
)
;
do
node_name
=
"compute0
${
node_num
}
"
kolla-cli host add
$node_name
kolla-cli group addhost external-compute
$node_name
done
for
node_num
in
$(
seq
1
${
NUMBER_OF_STORAGE_NODES
}
)
;
do
node_name
=
"storage0
${
node_num
}
"
kolla-cli host add
$node_name
kolla-cli group addhost storage
$node_name
done
for
node_num
in
$(
seq
1
${
NUMBER_OF_NETWORK_NODES
}
)
;
do
node_name
=
"network0
${
node_num
}
"
kolla-cli host add
$node_name
kolla-cli group addhost network
$node_name
done
for
node_num
in
$(
seq
1
${
NUMBER_OF_CONTROL_NODES
}
)
;
do
node_name
=
"control0
${
node_num
}
"
kolla-cli host add
$node_name
kolla-cli group addhost control
$node_name
done
fi
}
}
# Configure the operator node and install some additional packages.
# Configure the operator node and install some additional packages.
...
@@ -192,6 +236,7 @@ function configure_operator {
...
@@ -192,6 +236,7 @@ function configure_operator {
mkdir
-p
/usr/share/kolla
mkdir
-p
/usr/share/kolla
chown
-R
vagrant: /etc/kolla /usr/share/kolla
chown
-R
vagrant: /etc/kolla /usr/share/kolla
configure_kolla_cli
configure_kolla
configure_kolla
# Make sure Ansible uses scp.
# Make sure Ansible uses scp.
...
...
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