Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a5871282
authored
Feb 25, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenv: jól szétbachtuk a devenvet, mindenki jön a másiknak egy sörrel :(
parent
8228841b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
19 deletions
+27
-19
miscellaneous/devenv/nextinit.sh
+19
-15
miscellaneous/dump.json
+0
-0
one/models.py
+8
-4
No files found.
miscellaneous/devenv/nextinit.sh
View file @
a5871282
...
@@ -5,15 +5,13 @@ for i in cloudstore toplist django
...
@@ -5,15 +5,13 @@ for i in cloudstore toplist django
do
do
sudo
stop
$i
||
true
sudo
stop
$i
||
true
done
done
set
-x
cd
/opt/webadmin/cloud
sudo
apt-get install rabbitmq-server
./manage.py syncdb
--noinput
sudo
rabbitmqctl delete_user guest
||
true
./manage.py migrate
sudo
rabbitmqctl add_user nyuszi teszt
||
true
./manage.py loaddata miscellaneous/dump.json
sudo
rabbitmqctl add_vhost django
||
true
./manage.py loaddata miscellaneous/devenv/dev.json
sudo
rabbitmqctl set_permissions
-p
django nyuszi
'.*'
'.*'
'.*'
||
true
./manage.py update
./manage.py loaddata miscellaneous/devenv/dev.json
set
+x
#Set up store server
#Set up store server
rm
-rf
/var/www/
*
rm
-rf
/var/www/
*
...
@@ -44,6 +42,18 @@ do
...
@@ -44,6 +42,18 @@ do
sudo
start
$i
sudo
start
$i
done
done
set
-x
cd
/opt/webadmin/cloud
./manage.py syncdb
--noinput
./manage.py migrate
./manage.py loaddata miscellaneous/dump.json
./manage.py loaddata miscellaneous/devenv/dev.json
./manage.py update
./manage.py loaddata miscellaneous/devenv/dev.json
set
+x
cd
/opt/webadmin/cloud/miscellaneous/devenv
cd
/opt/webadmin/cloud/miscellaneous/devenv
sudo
cp vimrc.local /etc/vim/vimrc.local
sudo
cp vimrc.local /etc/vim/vimrc.local
...
@@ -59,9 +69,3 @@ git config --global core.editor vim
...
@@ -59,9 +69,3 @@ git config --global core.editor vim
true
true
sudo
apt-get install rabbitmq-server
sudo
rabbitmqctl delete_user guest
sudo
rabbitmqctl add_user nyuszi teszt
sudo
rabbitmqctl add_vhost django
sudo
rabbitmqctl set_permissions
-p
django nyuszi
'.*'
'.*'
'.*'
miscellaneous/dump.json
View file @
a5871282
This diff is collapsed.
Click to expand it.
one/models.py
View file @
a5871282
...
@@ -262,7 +262,7 @@ class Network(models.Model):
...
@@ -262,7 +262,7 @@ class Network(models.Model):
return
self
.
name
return
self
.
name
@staticmethod
@staticmethod
def
update
():
def
update
(
delete
=
True
):
"""Get and register virtual networks from OpenNebula."""
"""Get and register virtual networks from OpenNebula."""
import
subprocess
import
subprocess
proc
=
subprocess
.
Popen
([
"/opt/occi.sh"
,
"network"
,
"list"
],
proc
=
subprocess
.
Popen
([
"/opt/occi.sh"
,
"network"
,
"list"
],
...
@@ -282,7 +282,8 @@ class Network(models.Model):
...
@@ -282,7 +282,8 @@ class Network(models.Model):
except
:
except
:
Network
(
id
=
id
,
name
=
name
)
.
save
()
Network
(
id
=
id
,
name
=
name
)
.
save
()
l
.
append
(
id
)
l
.
append
(
id
)
cls
.
objects
.
exclude
(
id__in
=
l
)
.
delete
()
if
delete
:
Network
.
objects
.
exclude
(
id__in
=
l
)
.
delete
()
class
InstanceType
(
models
.
Model
):
class
InstanceType
(
models
.
Model
):
...
@@ -575,7 +576,10 @@ class Instance(models.Model):
...
@@ -575,7 +576,10 @@ class Instance(models.Model):
if
self
.
firewall_host
:
if
self
.
firewall_host
:
h
=
self
.
firewall_host
h
=
self
.
firewall_host
self
.
firewall_host
=
None
self
.
firewall_host
=
None
self
.
save
()
try
:
self
.
save
()
except
:
pass
h
.
delete
()
h
.
delete
()
def
_update_vm
(
self
,
template
):
def
_update_vm
(
self
,
template
):
...
@@ -633,7 +637,7 @@ class Instance(models.Model):
...
@@ -633,7 +637,7 @@ class Instance(models.Model):
def
check_if_is_save_as_done
(
self
):
def
check_if_is_save_as_done
(
self
):
if
self
.
state
!=
'DONE'
:
if
self
.
state
!=
'DONE'
:
return
False
return
False
Disk
.
update
()
Disk
.
update
(
delete
=
False
)
imgname
=
"template-
%
d-
%
d"
%
(
self
.
template
.
id
,
self
.
id
)
imgname
=
"template-
%
d-
%
d"
%
(
self
.
template
.
id
,
self
.
id
)
disks
=
Disk
.
objects
.
filter
(
name
=
imgname
)
disks
=
Disk
.
objects
.
filter
(
name
=
imgname
)
if
len
(
disks
)
!=
1
:
if
len
(
disks
)
!=
1
:
...
...
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