Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
27c71ae8
Commit
27c71ae8
authored
Jun 20, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stabilize KVM password generation.
Password is stored in plaintext on the file system.
parent
eed7410e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
slapos/recipe/kvm/__init__.py
slapos/recipe/kvm/__init__.py
+0
-6
software/kvm/instance-kvm.cfg
software/kvm/instance-kvm.cfg
+6
-0
No files found.
slapos/recipe/kvm/__init__.py
View file @
27c71ae8
...
...
@@ -25,7 +25,6 @@
#
##############################################################################
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
binascii
import
os
import
sys
...
...
@@ -33,11 +32,6 @@ class Recipe(GenericBaseRecipe):
"""
kvm instance configuration.
"""
def
__init__
(
self
,
buildout
,
name
,
options
):
options
[
'passwd'
]
=
binascii
.
hexlify
(
os
.
urandom
(
4
))
return
GenericBaseRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
def
install
(
self
):
config
=
dict
(
tap_interface
=
self
.
options
[
'tap'
],
...
...
software/kvm/instance-kvm.cfg
View file @
27c71ae8
...
...
@@ -35,6 +35,11 @@ ca-dir = $${rootdirectory:srv}/ssl
recipe = slapos.cookbook:generate.mac
storage-path = $${rootdirectory:srv}/mac
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:srv}/passwd
bytes = 4
[kvm-instance]
recipe = slapos.cookbook:kvm
vnc-ip = $${slap-network-information:local-ipv4}
...
...
@@ -54,6 +59,7 @@ controller-path = $${basedirectory:services}/kvm_controller
shell-path = ${dash:location}/bin/dash
qemu-path = ${kvm:location}/bin/qemu-system-x86_64
qemu-img-path = ${kvm:location}/bin/qemu-img
passwd = $${gen-passwd:passwd}
[kvm-promise]
recipe = slapos.cookbook:check_port_listening
...
...
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