Commit 74ba1d61 authored by Spiros Koulouzis's avatar Spiros Koulouzis

change docker repo , update build docker_push and dockerize

parent 34014b8b
......@@ -6,14 +6,25 @@ mvn -Dmaven.test.skip=true install
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd planner && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd ../
cd sure_tosca-flask-server && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt && venv/bin/pip3 install -r test-requirements.txt
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd ../
cd deployer && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
python_projects=(sure_tosca-flask-server sure_tosca-client_python_stubs semaphore-python-client-generated planner deployer)
for python_project in ${python_projects[*]}
do
echo "----------------- Building: $python_project---------------"
cd $python_project
rm -rf venv
python3 -m venv venv
venv/bin/pip3 install -r requirements.txt
if [ "$python_project" == "deployer" ]; then
cd ../semaphore-python-client-generated
../$python_project/venv/bin/python setup.py install
cd ../sure_tosca-client_python_stubs/
../$python_project/venv/bin/python setup.py install
fi
status=$?
[ $status -eq 0 ] && echo "----------------Build: $python_project successful ------" || exit -1
cd ../
done
#!/bin/bash
docker push alogo53/manager:3.0.0
docker push alogo53/provisioner:3.0.0
docker push alogo53/sure-tosca:3.0.0
docker push alogo53/planner:3.0.0
docker push alogo53/deployer:3.0.0
docker push qcdia/manager:3.0.0
docker push qcdia/provisioner:3.0.0
docker push qcdia/sure-tosca:3.0.0
docker push qcdia/planner:3.0.0
docker push qcdia/deployer:3.0.0
......@@ -10,16 +10,13 @@ cd provisioner && mvn -Dmaven.test.skip=true dockerfile:build
[ $status -eq 0 ] && echo "build successful" || exit -1
cd ../
echo "----------Building sure_tosca-flask-server Docker--------------"
# cd sure_tosca-flask-server && docker build -t alogo53/sure-tosca:3.0.0 .
cd sure_tosca-flask-server && docker build -t sure-tosca:3.0.0 .
[ $status -eq 0 ] && echo "build successful" || exit -1
echo "----------Building planner Docker--------------"
cd ../
# cd planner && docker build -t alogo53/planner:3.0.0 .
cd planner && docker build -t planner:3.0.0 .
[ $status -eq 0 ] && echo "build successful" || exit -1
echo "----------Building deployer Docker--------------"
cd ../
# cd deployer && docker build -t alogo53/deployer:3.0.0 .
cd deployer && docker build -t deployer:3.0.0 .
[ $status -eq 0 ] && echo "build successful" || exit -1
......@@ -10,7 +10,7 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<springfox-version>2.9.2</springfox-version>
<docker.image.prefix>alogo53</docker.image.prefix>
<docker.image.prefix>qcdia</docker.image.prefix>
</properties>
<parent>
<groupId>nl.uva.sne.drip</groupId>
......
wheel==0.34.2
flask-testing==0.8.0
coverage==5.0.4
nose>=1.3.7
pluggy==0.13.1
randomize==0.14
Werkzeug==1.0.0
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9453a48d-0d13-4782-8a8a-4af9ab871dbf" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/../deployer/service/polemarch_helper.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/profiles_settings.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/polemarch-python-client-generated.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../deployer/service/ansible_service.py" beforeDir="false" afterPath="$PROJECT_DIR$/../deployer/service/ansible_service.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../deployer/service/deploy_service.py" beforeDir="false" afterPath="$PROJECT_DIR$/../deployer/service/deploy_service.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../deployer/service/tosca_helper.py" beforeDir="false" afterPath="$PROJECT_DIR$/../deployer/service/tosca_helper.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../deployer/test-requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../deployer/test-requirements.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../deployer/test/test_deployer.py" beforeDir="false" afterPath="$PROJECT_DIR$/../deployer/test/test_deployer.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../docker-compose.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../docker-compose.yml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="IgnoredFileRootStore">
<option name="generatedRoots">
<set>
<option value="$PROJECT_DIR$/.idea" />
</set>
</option>
</component>
<component name="ProjectId" id="1ZlM2Ozq3wWdNnN5v2KalFhkmvL" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="9453a48d-0d13-4782-8a8a-4af9ab871dbf" name="Default Changelist" comment="" />
<created>1585409019931</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1585409019931</updated>
</task>
<servers />
</component>
<component name="WindowStateProjectService">
<state x="467" y="190" width="1053" height="732" key="find.popup" timestamp="1585418292797">
<screen x="67" y="34" width="1853" height="1046" />
</state>
<state x="467" y="190" width="1053" height="732" key="find.popup/67.34.1853.1046@67.34.1853.1046" timestamp="1585418292797" />
</component>
</project>
\ No newline at end of file
# coding: utf-8
# flake8: noqa
"""
Polemarch
### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) # noqa: E501
OpenAPI spec version: v2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import apis into sdk package
from polemarch_client.api.community_template_api import CommunityTemplateApi
from polemarch_client.api.group_api import GroupApi
from polemarch_client.api.history_api import HistoryApi
from polemarch_client.api.hook_api import HookApi
from polemarch_client.api.host_api import HostApi
from polemarch_client.api.inventory_api import InventoryApi
from polemarch_client.api.project_api import ProjectApi
from polemarch_client.api.team_api import TeamApi
from polemarch_client.api.user_api import UserApi
# import ApiClient
from polemarch_client.api_client import ApiClient
from polemarch_client.configuration import Configuration
# import models into sdk package
from polemarch_client.models.action_response import ActionResponse
from polemarch_client.models.ansible_module import AnsibleModule
from polemarch_client.models.ansible_playbook import AnsiblePlaybook
from polemarch_client.models.change_password import ChangePassword
from polemarch_client.models.chart_line_setting import ChartLineSetting
from polemarch_client.models.chart_line_settings import ChartLineSettings
from polemarch_client.models.counter_widget_setting import CounterWidgetSetting
from polemarch_client.models.create_user import CreateUser
from polemarch_client.models.data import Data
from polemarch_client.models.empty import Empty
from polemarch_client.models.error import Error
from polemarch_client.models.execute_response import ExecuteResponse
from polemarch_client.models.group import Group
from polemarch_client.models.group_create_master import GroupCreateMaster
from polemarch_client.models.history import History
from polemarch_client.models.hook import Hook
from polemarch_client.models.host import Host
from polemarch_client.models.inline_response200 import InlineResponse200
from polemarch_client.models.inline_response2001 import InlineResponse2001
from polemarch_client.models.inline_response20010 import InlineResponse20010
from polemarch_client.models.inline_response20011 import InlineResponse20011
from polemarch_client.models.inline_response20012 import InlineResponse20012
from polemarch_client.models.inline_response20013 import InlineResponse20013
from polemarch_client.models.inline_response20014 import InlineResponse20014
from polemarch_client.models.inline_response20015 import InlineResponse20015
from polemarch_client.models.inline_response20016 import InlineResponse20016
from polemarch_client.models.inline_response2002 import InlineResponse2002
from polemarch_client.models.inline_response2003 import InlineResponse2003
from polemarch_client.models.inline_response2004 import InlineResponse2004
from polemarch_client.models.inline_response2005 import InlineResponse2005
from polemarch_client.models.inline_response2006 import InlineResponse2006
from polemarch_client.models.inline_response2007 import InlineResponse2007
from polemarch_client.models.inline_response2008 import InlineResponse2008
from polemarch_client.models.inline_response2009 import InlineResponse2009
from polemarch_client.models.inventory import Inventory
from polemarch_client.models.inventory_import import InventoryImport
from polemarch_client.models.inventory_variable import InventoryVariable
from polemarch_client.models.module import Module
from polemarch_client.models.one_group import OneGroup
from polemarch_client.models.one_history import OneHistory
from polemarch_client.models.one_host import OneHost
from polemarch_client.models.one_inventory import OneInventory
from polemarch_client.models.one_module import OneModule
from polemarch_client.models.one_periodictask import OnePeriodictask
from polemarch_client.models.one_playbook import OnePlaybook
from polemarch_client.models.one_project import OneProject
from polemarch_client.models.one_project_template import OneProjectTemplate
from polemarch_client.models.one_team import OneTeam
from polemarch_client.models.one_template import OneTemplate
from polemarch_client.models.one_user import OneUser
from polemarch_client.models.periodic_task_variable import PeriodicTaskVariable
from polemarch_client.models.periodictask import Periodictask
from polemarch_client.models.playbook import Playbook
from polemarch_client.models.project import Project
from polemarch_client.models.project_create_master import ProjectCreateMaster
from polemarch_client.models.project_history import ProjectHistory
from polemarch_client.models.project_template import ProjectTemplate
from polemarch_client.models.project_template_create import ProjectTemplateCreate
from polemarch_client.models.project_variable import ProjectVariable
from polemarch_client.models.set_owner import SetOwner
from polemarch_client.models.team import Team
from polemarch_client.models.template import Template
from polemarch_client.models.template_exec import TemplateExec
from polemarch_client.models.user import User
from polemarch_client.models.user_settings import UserSettings
from polemarch_client.models.widget_setting import WidgetSetting
from polemarch_client.models.widget_settings import WidgetSettings
from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from polemarch_client.api.community_template_api import CommunityTemplateApi
from polemarch_client.api.group_api import GroupApi
from polemarch_client.api.history_api import HistoryApi
from polemarch_client.api.hook_api import HookApi
from polemarch_client.api.host_api import HostApi
from polemarch_client.api.inventory_api import InventoryApi
from polemarch_client.api.project_api import ProjectApi
from polemarch_client.api.team_api import TeamApi
from polemarch_client.api.user_api import UserApi
# coding: utf-8
"""
Polemarch
### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) # noqa: E501
OpenAPI spec version: v2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import copy
import logging
import multiprocessing
import sys
import urllib3
import six
from six.moves import http_client as httplib
class Configuration(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Ref: https://github.com/swagger-api/swagger-codegen
Do not edit the class manually.
"""
_default = None
def __init__(self):
"""Constructor"""
if self._default:
for key in self._default.__dict__.keys():
self.__dict__[key] = copy.copy(self._default.__dict__[key])
return
# Default Base url
self.host = "http://localhost:30001/api/v2"
# Temp file folder for downloading files
self.temp_folder_path = None
# Authentication Settings
# dict to store API key(s)
self.api_key = {}
# dict to store API prefix (e.g. Bearer)
self.api_key_prefix = {}
# function to refresh API key if expired
self.refresh_api_key_hook = None
# Username for HTTP basic authentication
self.username = ""
# Password for HTTP basic authentication
self.password = ""
# Logging Settings
self.logger = {}
self.logger["package_logger"] = logging.getLogger("polemarch_client")
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
# Log format
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
# Log stream handler
self.logger_stream_handler = None
# Log file handler
self.logger_file_handler = None
# Debug file location
self.logger_file = None
# Debug switch
self.debug = False
# SSL/TLS verification
# Set this to false to skip verifying SSL certificate when calling API
# from https server.
self.verify_ssl = True
# Set this to customize the certificate file to verify the peer.
self.ssl_ca_cert = None
# client certificate file
self.cert_file = None
# client key file
self.key_file = None
# Set this to True/False to enable/disable SSL hostname verification.
self.assert_hostname = None
# urllib3 connection pool's maximum number of connections saved
# per pool. urllib3 uses 1 connection as default value, but this is
# not the best value when you are making a lot of possibly parallel
# requests to the same host, which is often the case here.
# cpu_count * 5 is used as default value to increase performance.
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
# Proxy URL
self.proxy = None
# Safe chars for path_param
self.safe_chars_for_path_param = ''
@classmethod
def set_default(cls, default):
cls._default = default
@property
def logger_file(self):
"""The logger file.
If the logger_file is None, then add stream handler and remove file
handler. Otherwise, add file handler and remove stream handler.
:param value: The logger_file path.
:type: str
"""
return self.__logger_file
@logger_file.setter
def logger_file(self, value):
"""The logger file.
If the logger_file is None, then add stream handler and remove file
handler. Otherwise, add file handler and remove stream handler.
:param value: The logger_file path.
:type: str
"""
self.__logger_file = value
if self.__logger_file:
# If set logging file,
# then add file handler and remove stream handler.
self.logger_file_handler = logging.FileHandler(self.__logger_file)
self.logger_file_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_file_handler)
if self.logger_stream_handler:
logger.removeHandler(self.logger_stream_handler)
else:
# If not set logging file,
# then add stream handler and remove file handler.
self.logger_stream_handler = logging.StreamHandler()
self.logger_stream_handler.setFormatter(self.logger_formatter)
for _, logger in six.iteritems(self.logger):
logger.addHandler(self.logger_stream_handler)
if self.logger_file_handler:
logger.removeHandler(self.logger_file_handler)
@property
def debug(self):
"""Debug status
:param value: The debug status, True or False.
:type: bool
"""
return self.__debug
@debug.setter
def debug(self, value):
"""Debug status
:param value: The debug status, True or False.
:type: bool
"""
self.__debug = value
if self.__debug:
# if debug status is True, turn on debug logging
for _, logger in six.iteritems(self.logger):
logger.setLevel(logging.DEBUG)
# turn on httplib debug
httplib.HTTPConnection.debuglevel = 1
else:
# if debug status is False, turn off debug logging,
# setting log level to default `logging.WARNING`
for _, logger in six.iteritems(self.logger):
logger.setLevel(logging.WARNING)
# turn off httplib debug
httplib.HTTPConnection.debuglevel = 0
@property
def logger_format(self):
"""The logger format.
The logger_formatter will be updated when sets logger_format.
:param value: The format string.
:type: str
"""
return self.__logger_format
@logger_format.setter
def logger_format(self, value):
"""The logger format.
The logger_formatter will be updated when sets logger_format.
:param value: The format string.
:type: str
"""
self.__logger_format = value
self.logger_formatter = logging.Formatter(self.__logger_format)
def get_api_key_with_prefix(self, identifier):
"""Gets API key (with prefix if set).
:param identifier: The identifier of apiKey.
:return: The token for api key authentication.
"""
if self.refresh_api_key_hook:
self.refresh_api_key_hook(self)
key = self.api_key.get(identifier)
if key:
prefix = self.api_key_prefix.get(identifier)
if prefix:
return "%s %s" % (prefix, key)
else:
return key
def get_basic_auth_token(self):
"""Gets HTTP basic authentication header (string).
:return: The token for basic HTTP authentication.
"""
return urllib3.util.make_headers(
basic_auth=self.username + ':' + self.password
).get('authorization')
def auth_settings(self):
"""Gets Auth Settings dict for api client.
:return: The Auth Settings information dict.
"""
return {
'basic':
{
'type': 'basic',
'in': 'header',
'key': 'Authorization',
'value': self.get_basic_auth_token()
},
}
def to_debug_report(self):
"""Gets the essential information for debugging.
:return: The report for debugging.
"""
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v2\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
# coding: utf-8
"""
Polemarch
### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) # noqa: E501
OpenAPI spec version: v2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import polemarch_client
from polemarch_client.models.action_response import ActionResponse # noqa: E501
from polemarch_client.rest import ApiException
class TestActionResponse(unittest.TestCase):
"""ActionResponse unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testActionResponse(self):
"""Test ActionResponse"""
# FIXME: construct object with mandatory attributes with example values
# model = polemarch_client.models.action_response.ActionResponse() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment