Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
445fff03
Commit
445fff03
authored
Sep 02, 2015
by
Derek Carr
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11469 from fredjean/fix-vagrant-vmware
Boot a Vagrant on VMWare Kubernetes Cluster
parents
eb58220e
1305f546
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
+18
-11
Vagrantfile
Vagrantfile
+2
-2
init.sls
cluster/saltbase/salt/generate-cert/init.sls
+0
-3
provision-master.sh
cluster/vagrant/provision-master.sh
+8
-3
provision-minion.sh
cluster/vagrant/provision-minion.sh
+8
-3
No files found.
Vagrantfile
View file @
445fff03
...
@@ -74,8 +74,8 @@ $kube_provider_boxes = {
...
@@ -74,8 +74,8 @@ $kube_provider_boxes = {
},
},
:vmware_desktop
=>
{
:vmware_desktop
=>
{
'fedora'
=>
{
'fedora'
=>
{
:box_name
=>
'kube-fedora2
0
'
,
:box_name
=>
'kube-fedora2
1
'
,
:box_url
=>
'http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-2
0-i386
_chef-provisionerless.box'
:box_url
=>
'http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-2
1
_chef-provisionerless.box'
}
}
}
}
}
}
...
...
cluster/saltbase/salt/generate-cert/init.sls
View file @
445fff03
...
@@ -9,9 +9,6 @@
...
@@ -9,9 +9,6 @@
{% if grains.cloud == 'azure' %}
{% if grains.cloud == 'azure' %}
{% set cert_ip='_use_azure_dns_name_' %}
{% set cert_ip='_use_azure_dns_name_' %}
{% endif %}
{% endif %}
{% if grains.cloud == 'vagrant' %}
{% set cert_ip=grains.ip_interfaces.eth1[0] %}
{% endif %}
{% if grains.cloud == 'vsphere' %}
{% if grains.cloud == 'vsphere' %}
{% set cert_ip=grains.ip_interfaces.eth0[0] %}
{% set cert_ip=grains.ip_interfaces.eth0[0] %}
{% endif %}
{% endif %}
...
...
cluster/vagrant/provision-master.sh
View file @
445fff03
...
@@ -28,11 +28,16 @@ if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
...
@@ -28,11 +28,16 @@ if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
# Disable network interface being managed by Network Manager (needed for Fedora 21+)
# Disable network interface being managed by Network Manager (needed for Fedora 21+)
NETWORK_CONF_PATH
=
/etc/sysconfig/network-scripts/
NETWORK_CONF_PATH
=
/etc/sysconfig/network-scripts/
grep
-q
^NM_CONTROLLED
=
${
NETWORK_CONF_PATH
}
ifcfg-eth1
||
echo
'NM_CONTROLLED=no'
>>
${
NETWORK_CONF_PATH
}
ifcfg-eth1
if_to_edit
=
$(
find
${
NETWORK_CONF_PATH
}
ifcfg-
*
| xargs
grep
-l
VAGRANT-BEGIN
)
sed
-i
's/^#NM_CONTROLLED=.*/NM_CONTROLLED=no/'
${
NETWORK_CONF_PATH
}
ifcfg-eth1
for
if_conf
in
${
if_to_edit
}
;
do
grep
-q
^NM_CONTROLLED
=
${
if_conf
}
||
echo
'NM_CONTROLLED=no'
>>
${
if_conf
}
sed
-i
's/#^NM_CONTROLLED=.*/NM_CONTROLLED=no/'
${
if_conf
}
done
;
systemctl restart network
systemctl restart network
fi
fi
NETWORK_IF_NAME
=
`
echo
${
if_to_edit
}
|
awk
-F-
'{ print $3 }'
`
function
release_not_found
()
{
function
release_not_found
()
{
echo
"It looks as if you don't have a compiled version of Kubernetes. If you"
>
&2
echo
"It looks as if you don't have a compiled version of Kubernetes. If you"
>
&2
echo
"are running from a clone of the git repo, please run 'make quick-release'."
>
&2
echo
"are running from a clone of the git repo, please run 'make quick-release'."
>
&2
...
@@ -95,7 +100,7 @@ grains:
...
@@ -95,7 +100,7 @@ grains:
node_ip: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
node_ip: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
publicAddressOverride: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
publicAddressOverride: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
network_mode: openvswitch
network_mode: openvswitch
networkInterfaceName:
eth1
networkInterfaceName:
'
$(
echo
"
$NETWORK_IF_NAME
"
|
sed
-e
"s/'/''/g"
)
'
api_servers: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
api_servers: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
cloud: vagrant
cloud: vagrant
roles:
roles:
...
...
cluster/vagrant/provision-minion.sh
View file @
445fff03
...
@@ -79,11 +79,16 @@ if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
...
@@ -79,11 +79,16 @@ if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
# Disable network interface being managed by Network Manager (needed for Fedora 21+)
# Disable network interface being managed by Network Manager (needed for Fedora 21+)
NETWORK_CONF_PATH
=
/etc/sysconfig/network-scripts/
NETWORK_CONF_PATH
=
/etc/sysconfig/network-scripts/
grep
-q
^NM_CONTROLLED
=
${
NETWORK_CONF_PATH
}
ifcfg-eth1
||
echo
'NM_CONTROLLED=no'
>>
${
NETWORK_CONF_PATH
}
ifcfg-eth1
if_to_edit
=
$(
find
${
NETWORK_CONF_PATH
}
ifcfg-
*
| xargs
grep
-l
VAGRANT-BEGIN
)
sed
-i
's/^#NM_CONTROLLED=.*/NM_CONTROLLED=no/'
${
NETWORK_CONF_PATH
}
ifcfg-eth1
for
if_conf
in
${
if_to_edit
}
;
do
grep
-q
^NM_CONTROLLED
=
${
if_conf
}
||
echo
'NM_CONTROLLED=no'
>>
${
if_conf
}
sed
-i
's/#^NM_CONTROLLED=.*/NM_CONTROLLED=no/'
${
if_conf
}
done
;
systemctl restart network
systemctl restart network
fi
fi
NETWORK_IF_NAME
=
`
echo
${
if_to_edit
}
|
awk
-F-
'{ print $3 }'
`
# Setup hosts file to support ping by hostname to master
# Setup hosts file to support ping by hostname to master
if
[
!
"
$(
cat
/etc/hosts |
grep
$MASTER_NAME
)
"
]
;
then
if
[
!
"
$(
cat
/etc/hosts |
grep
$MASTER_NAME
)
"
]
;
then
echo
"Adding
$MASTER_NAME
to hosts file"
echo
"Adding
$MASTER_NAME
to hosts file"
...
@@ -142,7 +147,7 @@ grains:
...
@@ -142,7 +147,7 @@ grains:
network_mode: openvswitch
network_mode: openvswitch
node_ip: '
$(
echo
"
$MINION_IP
"
|
sed
-e
"s/'/''/g"
)
'
node_ip: '
$(
echo
"
$MINION_IP
"
|
sed
-e
"s/'/''/g"
)
'
api_servers: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
api_servers: '
$(
echo
"
$MASTER_IP
"
|
sed
-e
"s/'/''/g"
)
'
networkInterfaceName:
eth1
networkInterfaceName:
'
$(
echo
"
$NETWORK_IF_NAME
"
|
sed
-e
"s/'/''/g"
)
'
roles:
roles:
- kubernetes-pool
- kubernetes-pool
cbr-cidr: '
$(
echo
"
$CONTAINER_SUBNET
"
|
sed
-e
"s/'/''/g"
)
'
cbr-cidr: '
$(
echo
"
$CONTAINER_SUBNET
"
|
sed
-e
"s/'/''/g"
)
'
...
...
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