Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
18 deletions
+26
-18
miscellaneous/devenv/nextinit.sh
+19
-15
miscellaneous/dump.json
+0
-0
one/models.py
+7
-3
No files found.
miscellaneous/devenv/nextinit.sh
View file @
a5871282
...
...
@@ -5,15 +5,13 @@ for i in cloudstore toplist django
do
sudo
stop
$i
||
true
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
sudo
apt-get install rabbitmq-server
sudo
rabbitmqctl delete_user guest
||
true
sudo
rabbitmqctl add_user nyuszi teszt
||
true
sudo
rabbitmqctl add_vhost django
||
true
sudo
rabbitmqctl set_permissions
-p
django nyuszi
'.*'
'.*'
'.*'
||
true
#Set up store server
rm
-rf
/var/www/
*
...
...
@@ -44,6 +42,18 @@ do
sudo
start
$i
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
sudo
cp vimrc.local /etc/vim/vimrc.local
...
...
@@ -59,9 +69,3 @@ git config --global core.editor vim
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):
return
self
.
name
@staticmethod
def
update
():
def
update
(
delete
=
True
):
"""Get and register virtual networks from OpenNebula."""
import
subprocess
proc
=
subprocess
.
Popen
([
"/opt/occi.sh"
,
"network"
,
"list"
],
...
...
@@ -282,7 +282,8 @@ class Network(models.Model):
except
:
Network
(
id
=
id
,
name
=
name
)
.
save
()
l
.
append
(
id
)
cls
.
objects
.
exclude
(
id__in
=
l
)
.
delete
()
if
delete
:
Network
.
objects
.
exclude
(
id__in
=
l
)
.
delete
()
class
InstanceType
(
models
.
Model
):
...
...
@@ -575,7 +576,10 @@ class Instance(models.Model):
if
self
.
firewall_host
:
h
=
self
.
firewall_host
self
.
firewall_host
=
None
try
:
self
.
save
()
except
:
pass
h
.
delete
()
def
_update_vm
(
self
,
template
):
...
...
@@ -633,7 +637,7 @@ class Instance(models.Model):
def
check_if_is_save_as_done
(
self
):
if
self
.
state
!=
'DONE'
:
return
False
Disk
.
update
()
Disk
.
update
(
delete
=
False
)
imgname
=
"template-
%
d-
%
d"
%
(
self
.
template
.
id
,
self
.
id
)
disks
=
Disk
.
objects
.
filter
(
name
=
imgname
)
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