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
eea981fb
authored
Jul 22, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fabfile: fix things
parent
ffa1d2cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
circle/fabfile.py
+8
-5
No files found.
circle/fabfile.py
View file @
eea981fb
...
...
@@ -2,6 +2,7 @@ import contextlib
import
datetime
from
fabric.api
import
env
,
run
,
settings
,
sudo
,
prefix
,
cd
,
execute
from
fabric.context_managers
import
shell_env
from
fabric.decorators
import
roles
,
parallel
from
vm.models
import
Node
...
...
@@ -17,7 +18,7 @@ env.roledefs['storage'] = [DataStore.objects.get().hostname]
def
update_all
():
"Update and restart portal+manager, nodes and storage"
execute
(
stop_portal
)
execute
(
update_node
)
execute
(
parallel
(
update_node
)
)
execute
(
update_storage
)
execute
(
update_portal
)
...
...
@@ -84,8 +85,11 @@ def test(test=""):
def
pull
(
dir
=
"~/circle/circle"
):
"Pull from upstream branch (stash any changes)"
now
=
unicode
(
datetime
.
datetime
.
now
())
with
cd
(
dir
):
run
(
"git status || git stash save update
%
s"
%
now
)
with
cd
(
dir
),
shell_env
(
GIT_AUTHOR_NAME
=
"fabric"
,
GIT_AUTHOR_EMAIL
=
"fabric@local"
,
GIT_COMMITTER_NAME
=
"fabric"
,
GIT_COMMITTER_EMAIL
=
"fabric@local"
):
run
(
"git stash save update
%
s"
%
now
)
run
(
"git pull --ff-only"
)
...
...
@@ -107,11 +111,10 @@ def stop_portal(test=False):
_stop_services
(
"portal"
,
"mancelery"
)
@parallel
@roles
(
'node'
)
def
update_node
():
"Update and restart nodes"
with
_stopped
(
"node"
,
"agent"
):
with
_stopped
(
"node"
,
"agent
driver
"
):
pull
(
"~/vmdriver"
)
pip
(
"vmdriver"
,
"~/vmdriver/requirements/production.txt"
)
pull
(
"~/agentdriver"
)
...
...
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