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
176bfdbb
Unverified
Commit
176bfdbb
authored
Jul 10, 2020
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Vagrant dev environment
parent
925a6d2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
Vagrantfile
Vagrantfile
+6
-5
centos8
scripts/provision/generic/centos8
+2
-0
ubuntu2004
scripts/provision/generic/ubuntu2004
+2
-0
No files found.
Vagrantfile
View file @
176bfdbb
OS
=
(
ENV
[
'OS'
]
||
"alpine310"
)
BOX_REPO
=
(
ENV
[
'BOX_REPO'
]
||
"generic"
)
HOME
=
File
.
dirname
(
__FILE__
)
PROJECT
=
File
.
basename
(
HOME
)
HOME
=
ENV
[
'HOME'
]
PROJ_HOME
=
File
.
dirname
(
__FILE__
)
PROJECT
=
File
.
basename
(
PROJ_HOME
)
NUM_NODES
=
(
ENV
[
'NUM_NODES'
]
||
0
).
to_i
NODE_CPUS
=
(
ENV
[
'NODE_CPUS'
]
||
4
).
to_i
NODE_MEMORY
=
(
ENV
[
'NODE_MEMORY'
]
||
4096
).
to_i
NODE_MEMORY
=
(
ENV
[
'NODE_MEMORY'
]
||
8192
).
to_i
NETWORK_PREFIX
=
ENV
[
'NETWORK_PREFIX'
]
||
"10.135.135"
VAGRANT_PROVISION
=
ENV
[
'VAGRANT_PROVISION'
]
||
"./scripts/provision/vagrant"
MOUNT_TYPE
=
ENV
[
'MOUNT_TYPE'
]
||
"nfs"
...
...
@@ -22,7 +23,7 @@ def provision(vm, node_num)
vm
.
network
"private_network"
,
ip:
"
#{
NETWORK_PREFIX
}
.
#{
100
+
node_num
}
"
vm
.
provision
"shell"
,
path:
VAGRANT_PROVISION
,
env:
{
'HOME'
=>
HOME
,
'GOPATH'
=>
ENV
[
'GOPATH'
],
'BOX'
=>
vm
.
box
}
env:
{
'HOME'
=>
PROJ_
HOME
,
'GOPATH'
=>
ENV
[
'GOPATH'
],
'BOX'
=>
vm
.
box
}
end
Vagrant
.
configure
(
"2"
)
do
|
config
|
...
...
@@ -35,7 +36,7 @@ Vagrant.configure("2") do |config|
if
Vagrant
.
has_plugin?
(
"vagrant-timezone"
)
config
.
timezone
.
value
=
:host
end
config
.
vm
.
synced_folder
"."
,
HOME
,
type:
MOUNT_TYPE
config
.
vm
.
synced_folder
HOME
,
HOME
,
type:
MOUNT_TYPE
if
NUM_NODES
==
0
provision
(
config
.
vm
,
0
)
...
...
scripts/provision/generic/centos8
0 → 120000
View file @
176bfdbb
centos7
\ No newline at end of file
scripts/provision/generic/ubuntu2004
0 → 120000
View file @
176bfdbb
ubuntu1804
\ No newline at end of file
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