Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #743 from deNBI/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
eKatchko authored Jun 22, 2021
2 parents 3d1d3de + 47913f5 commit 3650956
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .env.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OS_PROJECT_DOMAIN_ID=
OS_PASSWORD=

# Filebeat
FILEBEAT_TAG=7.13.0
FILEBEAT_TAG=7.13.1
ELASTIC_USER=
ELASTIC_PASSWORD=
HOST=portal-dev.denbi.de
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.update
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM denbicloud/cloud-portal-client:0.1.0-beta.0.15.1
FROM bibiserv/bibigrid:bibigrid-rest-2.3
FROM docker.elastic.co/beats/filebeat:7.13.0
FROM docker.elastic.co/beats/filebeat:7.13.1
34 changes: 20 additions & 14 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,21 @@ def __init__(self, config):
self.BIBIGRID_MODES = cfg["bibigrid"]["bibigrid_modes"]
self.BIBIGRID_HOST = cfg["bibigrid"]["host"]
self.BIBIGRID_PORT = cfg["bibigrid"]["port"]
self.BIBIGRID_URL = str(cfg["bibigrid"]["bibigrid_url"])
self.BIBIGRID_URL = self.BIBIGRID_URL.format(
host=self.BIBIGRID_HOST, port=self.BIBIGRID_PORT
)
if cfg["bibigrid"].get("https", False):
self.BIBIGRID_URL = (
f"https://{self.BIBIGRID_HOST}:{self.BIBIGRID_PORT}/bibigrid"
)
self.BIBIGIRD_EP = (
f"https://{self.BIBIGRID_HOST}:{self.BIBIGRID_PORT}"
)
else:
self.BIBIGRID_URL = (
f"http://{self.BIBIGRID_HOST}:{self.BIBIGRID_PORT}/bibigrid"
)
self.BIBIGIRD_EP = (
f"http://{self.BIBIGRID_HOST}:{self.BIBIGRID_PORT}"
)

LOG.info(msg="Bibigrd url loaded: {0}".format(self.BIBIGRID_URL))
except Exception as e:
LOG.exception(e)
Expand Down Expand Up @@ -2039,22 +2050,17 @@ def get_cluster_status(self, cluster_id):

def bibigrid_available(self):
LOG.info("Checking if Bibigrid is available")
if not self.BIBIGRID_URL:
LOG.info("Bibigrid Url is not set")
if not self.BIBIGIRD_EP:
LOG.info("Bibigrid EP is not set")
return False
try:
location = (self.BIBIGRID_HOST, self.BIBIGRID_PORT)
a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
result_of_check = a_socket.connect_ex(location)
a_socket.close()
if result_of_check == 0:
LOG.info("Bibigrid Port is open")
LOG.info("Bibigrid is available")
status = req.get(self.BIBIGIRD_EP + "/server/health").status_code
if status == 200:
LOG.info("Bibigrid Server is available")
return True

else:

LOG.info("Bibigrid Port is not open")
LOG.exception("Bibigrid is offline")
return False

Expand Down
2 changes: 1 addition & 1 deletion VirtualMachineService/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bibigrid:
# Url for Bibigrid API
port: 8080
host: bibigrid
bibigrid_url: http://{host}:{port}/bibigrid/
https: False
sub_network: portalexternalsubnetwork
bibigrid_modes:
- slurm
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ python-keystoneclient
openstacksdk ==0.57.0
deprecated == 1.2.12
Click==8.0.1
ansible==4.0.0
ansible==4.1.0
flake8==3.9.2
ruamel.yaml<0.18.0
paramiko==2.7.2
Expand Down

0 comments on commit 3650956

Please sign in to comment.