Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
2e96b653
Commit
2e96b653
authored
6 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
Story
SW-300
: fixing logfile
parent
bf877494
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!89
Monitoring maintenance Epic branch merge
,
!1
Resolve OSB-13 "Monitoringmaintenance "
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LCU/Maintenance/DBInterface/django_postgresql/settings.py
+3
-3
3 additions, 3 deletions
LCU/Maintenance/DBInterface/django_postgresql/settings.py
LCU/Maintenance/MDB_tools/cli/release_code.py
+20
-5
20 additions, 5 deletions
LCU/Maintenance/MDB_tools/cli/release_code.py
with
23 additions
and
8 deletions
LCU/Maintenance/DBInterface/django_postgresql/settings.py
+
3
−
3
View file @
2e96b653
...
@@ -96,15 +96,15 @@ LOGGING = {
...
@@ -96,15 +96,15 @@ LOGGING = {
},
},
'
loggers
'
:
{
'
loggers
'
:
{
'
station_test.parser
'
:
{
'
station_test.parser
'
:
{
'
handlers
'
:
[
'
log_fi
le
'
],
'
handlers
'
:
[
'
conso
le
'
],
'
level
'
:
'
DEBUG
'
,
'
level
'
:
'
DEBUG
'
,
},
},
'
views
'
:
{
'
views
'
:
{
'
handlers
'
:
[
'
log_file
'
,
'
console
'
],
'
handlers
'
:
[
'
console
'
],
'
level
'
:
'
DEBUG
'
,
'
level
'
:
'
DEBUG
'
,
},
},
'
serializers
'
:
{
'
serializers
'
:
{
'
handlers
'
:
[
'
log_file
'
,
'
console
'
],
'
handlers
'
:
[
'
console
'
],
'
level
'
:
'
DEBUG
'
,
'
level
'
:
'
DEBUG
'
,
},
},
...
...
This diff is collapsed.
Click to expand it.
LCU/Maintenance/MDB_tools/cli/release_code.py
+
20
−
5
View file @
2e96b653
import
logging
import
logging
import
argparse
import
argparse
import
fabric
from
fabric.transfer
import
Transfer
from
fabric.connection
import
Connection
import
requests
import
requests
import
sys
import
sys
import
json
import
json
...
@@ -22,13 +23,27 @@ def setup_argument_parser():
...
@@ -22,13 +23,27 @@ def setup_argument_parser():
parser
.
add_argument
(
'
-u
'
,
'
--user
'
,
help
=
'
username
'
,
default
=
False
)
parser
.
add_argument
(
'
-u
'
,
'
--user
'
,
help
=
'
username
'
,
default
=
False
)
parser
.
add_argument
(
'
--address
'
,
help
=
'
address of the server. default [localhost]:8000
'
,
parser
.
add_argument
(
'
--address
'
,
help
=
'
address of the server. default [localhost]:8000
'
,
default
=
'
lofarmonitortest.control.lofar
'
)
default
=
'
lofarmonitortest.control.lofar
'
)
parser
.
add_argument
(
'
--address
'
,
help
=
'
address of the server. default [localhost]:8000
'
,
default
=
'
lofarmonitortest.control.lofar
'
)
parser
.
add_argument
(
'
remote_install_path
'
,
help
=
'
remote path where to install the code
'
)
parser
.
add_argument
(
'
--remote_install_path
'
,
help
=
'
remote path where to install the code
'
,
default
=
'
deploy/test
'
)
return
parser
return
parser
def
installing_files
(
local_root_path
,
remote_root_path
,
address
):
"""
Copies the django installation to the remote path
:param local_root_path: path to the local directory containing the files
:param remote_root_path: remote path where to install the files
:return:
"""
with
Connection
(
address
)
as
connection
:
transfer
=
Transfer
(
connection
)
transfer
.
put
(
local_root_path
,
remote_root_path
)
def
parse_arguments
(
parser
):
def
parse_arguments
(
parser
):
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
@@ -36,4 +51,4 @@ if __name__=='__main__':
...
@@ -36,4 +51,4 @@ if __name__=='__main__':
logging
.
basicConfig
(
format
=
"
%(asctime)s %(levelname)s: %(message)s
"
,
level
=
logging
.
DEBUG
)
logging
.
basicConfig
(
format
=
"
%(asctime)s %(levelname)s: %(message)s
"
,
level
=
logging
.
DEBUG
)
parser
=
setup_argument_parser
()
parser
=
setup_argument_parser
()
args
=
parse_arguments
(
parser
)
args
=
parse_arguments
(
parser
)
installing_files
(
args
.
path
,
args
.
remote_install_path
,
args
.
address
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment