Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
itminedu
synnefo
Commits
a03c0698
Commit
a03c0698
authored
Aug 01, 2014
by
Alex Pyrgiotis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deploy: Add admin app in deploy
parent
b2089c14
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
75 additions
and
0 deletions
+75
-0
ci/schemas/one_node_wheezy/packages.conf
ci/schemas/one_node_wheezy/packages.conf
+1
-0
ci/schemas/one_node_wheezy/setups.conf
ci/schemas/one_node_wheezy/setups.conf
+1
-0
snf-deploy/conf/packages.conf
snf-deploy/conf/packages.conf
+1
-0
snf-deploy/conf/setups.conf
snf-deploy/conf/setups.conf
+1
-0
snf-deploy/files/etc/synnefo/admin.conf
snf-deploy/files/etc/synnefo/admin.conf
+3
-0
snf-deploy/snfdeploy/components.py
snf-deploy/snfdeploy/components.py
+64
-0
snf-deploy/snfdeploy/constants.py
snf-deploy/snfdeploy/constants.py
+1
-0
snf-deploy/snfdeploy/context.py
snf-deploy/snfdeploy/context.py
+1
-0
snf-deploy/snfdeploy/fabfile.py
snf-deploy/snfdeploy/fabfile.py
+1
-0
snf-deploy/snfdeploy/roles.py
snf-deploy/snfdeploy/roles.py
+1
-0
No files found.
ci/schemas/one_node_wheezy/packages.conf
View file @
a03c0698
...
...
@@ -7,5 +7,6 @@ curl = 7.26.0-1+wheezy9
snf
-
image
=
unstable
snf
-
ganeti
=
unstable
ganeti2
=
unstable
python
-
django
-
eztables
=
0
.
3
.
3
-
1
~
snf
~
0
.
2
[
ubuntu
]
ci/schemas/one_node_wheezy/setups.conf
View file @
a03c0698
...
...
@@ -13,6 +13,7 @@ db = node
mq
=
node
astakos
=
node
cyclades
=
node
admin
=
node
pithos
=
node
cms
=
node
stats
=
node
...
...
snf-deploy/conf/packages.conf
View file @
a03c0698
...
...
@@ -7,5 +7,6 @@ curl = 7.26.0-1+wheezy9
snf
-
image
=
0
.
14
-
1
~
wheezy
snf
-
ganeti
=
unstable
ganeti2
=
unstable
python
-
django
-
eztables
=
0
.
3
.
3
-
1
~
snf
~
0
.
2
[
ubuntu
]
snf-deploy/conf/setups.conf
View file @
a03c0698
...
...
@@ -13,6 +13,7 @@ db = node
mq
=
node
astakos
=
node
cyclades
=
node
admin
=
node
pithos
=
node
cms
=
node
stats
=
node
...
...
snf-deploy/files/etc/synnefo/admin.conf
0 → 100644
View file @
a03c0698
## Uncomment the following line when admin is installed in a separate node.
## This setting cuts all other urls and uses only the urls of admin.
#ROOT_URLCONF="synnefo_admin.admin.urls"
snf-deploy/snfdeploy/components.py
View file @
a03c0698
...
...
@@ -80,6 +80,7 @@ def update_admin(fn):
cl
.
DB
=
DB
(
node
=
ctx
.
db
.
node
,
ctx
=
ctx
)
cl
.
ASTAKOS
=
Astakos
(
node
=
ctx
.
astakos
.
node
,
ctx
=
ctx
)
cl
.
CYCLADES
=
Cyclades
(
node
=
ctx
.
cyclades
.
node
,
ctx
=
ctx
)
cl
.
ADMIN
=
Admin
(
node
=
ctx
.
admin
.
node
,
ctx
=
ctx
)
cl
.
CLIENT
=
Client
(
node
=
ctx
.
client
.
node
,
ctx
=
ctx
)
return
fn
(
*
args
,
**
kwargs
)
return
wrapper
...
...
@@ -1535,6 +1536,68 @@ class VNC(base.Component):
]
class
Admin
(
base
.
Component
):
REQUIRED_PACKAGES
=
[
"python-django-eztables"
,
"snf-admin-app"
]
alias
=
constants
.
ADMIN
service
=
constants
.
ADMIN
def
required_components
(
self
):
return
[
HW
,
SSH
,
DNS
,
APT
,
Apache
,
Gunicorn
,
Common
,
Webproject
,
]
@
update_admin
def
admin_pre
(
self
):
self
.
NS
.
update_ns
()
self
.
DB
.
allow_db_access
()
self
.
DB
.
restart
()
@
base
.
run_cmds
@
update_admin
def
prepare
(
self
):
f
=
"/etc/synnefo/astakos.conf"
self
.
ASTAKOS
.
get
(
f
,
"/tmp/astakos.conf"
)
self
.
put
(
"/tmp/astakos.conf"
,
f
)
f
=
"/etc/synnefo/cyclades.conf"
self
.
CYCLADES
.
get
(
f
,
"/tmp/cyclades.conf"
)
self
.
put
(
"/tmp/cyclades.conf"
,
f
)
return
[]
def
_configure
(
self
):
return
[
(
"/etc/synnefo/admin.conf"
,
{},
{})
]
@
base
.
run_cmds
def
initialize
(
self
):
return
[
"snf-manage group-add admin"
]
@
base
.
run_cmds
def
restart
(
self
):
return
[
"/etc/init.d/gunicorn restart"
]
@
base
.
run_cmds
def
make_user_admin_user
(
self
):
user_id
=
context
.
user_id
return
[
"snf-manage user-modify %s --add-group=admin"
%
user_id
]
@
update_admin
@
cert_override
def
admin_post
(
self
):
pass
class
Kamaki
(
base
.
Component
):
REQUIRED_PACKAGES
=
[
"python-progress"
,
...
...
@@ -1546,6 +1609,7 @@ class Kamaki(base.Component):
self
.
ASTAKOS
.
add_user
()
self
.
ASTAKOS
.
activate_user
()
self
.
DB
.
get_user_info_from_db
(
config
.
user_email
)
self
.
ADMIN
.
make_user_admin_user
()
@
base
.
run_cmds
def
initialize
(
self
):
...
...
snf-deploy/snfdeploy/constants.py
View file @
a03c0698
...
...
@@ -18,6 +18,7 @@ DB = "db"
MQ
=
"mq"
ASTAKOS
=
"astakos"
CYCLADES
=
"cyclades"
ADMIN
=
"admin"
PITHOS
=
"pithos"
CLIENT
=
"client"
ROUTER
=
"router"
...
...
snf-deploy/snfdeploy/context.py
View file @
a03c0698
...
...
@@ -65,6 +65,7 @@ class Context(object):
self
.
db
=
self
.
_get
(
constants
.
DB
)
self
.
astakos
=
self
.
_get
(
constants
.
ASTAKOS
)
self
.
cyclades
=
self
.
_get
(
constants
.
CYCLADES
)
self
.
admin
=
self
.
_get
(
constants
.
ADMIN
)
self
.
pithos
=
self
.
_get
(
constants
.
PITHOS
)
self
.
stats
=
self
.
_get
(
constants
.
STATS
)
self
.
cms
=
self
.
_get
(
constants
.
CMS
)
...
...
snf-deploy/snfdeploy/fabfile.py
View file @
a03c0698
...
...
@@ -107,6 +107,7 @@ def setup_synnefo():
setup_role
(
constants
.
ASTAKOS
)
setup_role
(
constants
.
PITHOS
)
setup_role
(
constants
.
CYCLADES
)
setup_role
(
constants
.
ADMIN
)
setup_role
(
constants
.
CMS
)
setup_cluster
()
...
...
snf-deploy/snfdeploy/roles.py
View file @
a03c0698
...
...
@@ -24,6 +24,7 @@ _ROLE_MAP = {
constants
.
MQ
:
components
.
MQ
,
constants
.
ASTAKOS
:
components
.
Astakos
,
constants
.
CYCLADES
:
components
.
Cyclades
,
constants
.
ADMIN
:
components
.
Admin
,
constants
.
PITHOS
:
components
.
Pithos
,
constants
.
CMS
:
components
.
CMS
,
constants
.
STATS
:
components
.
Stats
,
...
...
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