Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
LOFAR2.0
tango
Commits
c80d9550
Commit
c80d9550
authored
4 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
Configure host to allow ELK stack to run, if needed
parent
4ac3ed09
No related branches found
No related tags found
1 merge request
!7
Resolve #2021 "03 16 branched from master elk stack"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker-compose/elk.yml
+10
-0
10 additions, 0 deletions
docker-compose/elk.yml
docker-compose/lofar-device-base/Dockerfile
+3
-0
3 additions, 0 deletions
docker-compose/lofar-device-base/Dockerfile
jupyter-notebooks/Start All Devices.ipynb
+15
-12
15 additions, 12 deletions
jupyter-notebooks/Start All Devices.ipynb
with
28 additions
and
12 deletions
docker-compose/elk.yml
+
10
−
0
View file @
c80d9550
...
...
@@ -3,11 +3,19 @@
# See https://elk-docker.readthedocs.io/
#
# Defines:
# - elk-configure-host: Configures the hosts's kernel to be able to use the ELK stack
# - elk: ELK stack
#
version
:
'
2'
services
:
elk-configure-host
:
image
:
elk-configure-host
build
:
context
:
elk-configure-host
container_name
:
${CONTAINER_NAME_PREFIX}elk-configure-host
network_mode
:
${NETWORK_MODE}
elk
:
image
:
sebp/elk
container_name
:
${CONTAINER_NAME_PREFIX}elk
...
...
@@ -16,3 +24,5 @@ services:
-
"
5601:5601"
-
"
9200:9200"
-
"
5044:5044"
depends_on
:
-
elk-configure-host
This diff is collapsed.
Click to expand it.
docker-compose/lofar-device-base/Dockerfile
+
3
−
0
View file @
c80d9550
...
...
@@ -2,3 +2,6 @@ FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:latest
COPY
lofar-requirements.txt /lofar-requirements.txt
RUN
pip3
install
-r
/lofar-requirements.txt
ENV
TANGO_LOG_PATH=/var/log/tango
RUN
sudo mkdir
-p
/var/log/tango
&&
sudo chmod
a+rwx /var/log/tango
This diff is collapsed.
Click to expand it.
jupyter-notebooks/Start All Devices.ipynb
+
15
−
12
View file @
c80d9550
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
null
,
"id": "social-massachusetts",
"metadata": {},
"outputs": [],
...
...
@@ -22,20 +22,13 @@
},
{
"cell_type": "code",
"execution_count":
10
,
"execution_count":
null
,
"id": "defined-apache",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Device PCC(lts/pcc/1) is now in state FAULT\n",
"Device SDP(lts/sdp/1) is now in state ON\n"
]
}
],
"outputs": [],
"source": [
"sdp = DeviceProxy(\"SDP/LTS/1\")\n",
"sdp.force_start()\n",
"for d in devices:\n",
" print(\"Device %s is now in state %s\" % (d, force_start(d)))"
]
...
...
@@ -46,6 +39,16 @@
"id": "superior-wheel",
"metadata": {},
"outputs": [],
"source": [
"devices"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fifteen-transportation",
"metadata": {},
"outputs": [],
"source": []
}
],
...
...
%% Cell type:code id:social-massachusetts tags:
```
python
def
force_start
(
device
):
if
device
.
state
()
==
DevState
.
FAULT
:
device
.
Off
()
if
device
.
state
()
==
DevState
.
OFF
:
device
.
initialise
()
if
device
.
state
()
==
DevState
.
INIT
:
device
.
Standby
()
if
device
.
state
()
==
DevState
.
STANDBY
:
device
.
On
()
return
device
.
state
()
```
%% Cell type:code id:defined-apache tags:
```
python
sdp
=
DeviceProxy
(
"
SDP/LTS/1
"
)
sdp
.
force_start
()
for
d
in
devices
:
print
(
"
Device %s is now in state %s
"
%
(
d
,
force_start
(
d
)))
```
%%
Output
%%
Cell type:code id:superior-wheel tags:
Device PCC(lts/pcc/1) is now in state FAULT
Device SDP(lts/sdp/1) is now in state ON
```
python
devices
```
%% Cell type:code id:
superior-wheel
tags:
%% Cell type:code id:
fifteen-transportation
tags:
```
python
```
...
...
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