Commit 259bb2b8 by Amir Aharon

add some

parent d93410ce
No preview for this file type
Install MicroK8s from ubuntu software center
https://www.digitalocean.com/community/tutorials/how-to-migrate-a-docker-compose-workflow-to-kubernetes
CREATING A JAVA PROJECT FROM SWAGGER EDITOR:
- create the swagger file (json/yml) load it to swagger editor.
- validate the file in the editor
- go to 'Genarate Server' > 'Undertow'
- copy and open the downloaded zip
- via terminal go to the project location and type: 'gradle init', this will create the gradle project from maven file
- open the project from intellij , choose the buold.gradle file, and choose open as project
- in build.gradle file:
- change the 'repositories' to mavenCentral()
- change: sourceCompatibility = 1.8
targetCompatibility = 1.8
- click clean and assemble on the left gradle panel
- in case there is no App (main) class, create App.java class and add the following code:
public class App {
public static void main(String[] args) {
Undertow server = Undertow.builder()
.addHttpListener(8080, "localhost")
.setHandler(new PathHandlerProvider().getHandler()) // PathHandlerProvider is the handler file
.build();
server.start();
}
}
- to Genarated RestResponse::
- add success = false; to setError()
- change objectNode type to JsonNode
CREATING PYTHON CODE FROM SWAGGER:
- create the swagger file (json/yml) load it to swagger editor.
- validate the file in the editor
- go to 'Genarate Server' > 'python-flask'
- copy and open the downloaded zip
- in 'requirements.txt' change connexion to 2.6.0
- follow the README.md
......@@ -17,8 +17,12 @@ curl -XPUT "http://localhost:9200/activityidx" -d'{ "mappings": { "activity": {
Steps to change mapping type by reindexing and alias on a new index (using the kibana tools):
1 - get the mapping of the original index: GET activityidx/_mapping (delete the starting field 'activityidx)
2 - create a json file with the changed mapping (without the index name at the begining of json)
3 - curl -XPUT localhost:9200/activityidx_v1 -H 'Content-Type: application/json' -d @index-mapping (using curl)
4 reindex to the new original to the new one:
3 - create a new index with the mapping:
curl -XPUT localhost:9200/activityidx_v1 -H 'Content-Type: application/json' -d @[file name] (using curl)
or with kibana dev tools:
PUT /[new-index-name]
{ ... the mapping json}
4 reindex the original to the new one:
POST _reindex
{
"conflicts": "proceed",
......
......@@ -163,7 +163,6 @@ Safety<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Mod
</node>
<node id="n13">
<data key="d4" xml:space="preserve"/>
<data key="d5"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="166.77599334716797" width="499.02001953125" x="346.78857421875" y="-71.0"/>
......@@ -193,6 +192,20 @@ for Scp<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Mo
</y:ShapeNode>
</data>
</node>
<node id="n15">
<data key="d4" xml:space="preserve"/>
<data key="d6">
<y:UMLNoteNode>
<y:Geometry height="107.77599334716797" width="436.0" x="-215.4228515625" y="-138.0"/>
<y:Fill hasColor="false" transparent="false"/>
<y:BorderStyle color="#000000" type="line" width="1.0"/>
<y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="59.875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="415.64453125" x="10.177734375" xml:space="preserve" y="23.950496673583984">* Activities Service can recieve activities from the following sources:
1 - Rest Calls - Http
2 - MsgQ - ZMQ
3 - Pub/Sub - publish to Pulsar topic 'mcx/activities/*'<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:ModelParameter><y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/></y:ModelParameter></y:NodeLabel>
</y:UMLNoteNode>
</data>
</node>
<edge id="e0" source="n0" target="n1">
<data key="d10">
<y:PolyLineEdge>
......@@ -294,6 +307,7 @@ for Scp<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Mo
</y:Path>
<y:LineStyle color="#000000" type="line" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" verticalTextPosition="bottom" visible="true" width="103.498046875" x="98.35651550292967" xml:space="preserve" y="133.01562499999997">Rest/ZMQ/Pulsar<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/></y:LabelModel><y:ModelParameter><y:SmartEdgeLabelModelParameter angle="6.283185307179586" distance="69.3869140625" distanceToCenter="true" position="right" ratio="0.8731603692515669" segment="-1"/></y:ModelParameter><y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/></y:EdgeLabel>
<y:BendStyle smoothed="false"/>
</y:PolyLineEdge>
</data>
......@@ -360,7 +374,6 @@ for Scp<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Mo
</data>
</edge>
<edge id="e15" source="n2" target="n14">
<data key="d9"/>
<data key="d10">
<y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
......@@ -370,6 +383,32 @@ for Scp<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Mo
</y:PolyLineEdge>
</data>
</edge>
<edge id="e16" source="n15" target="n0">
<data key="d9"/>
<data key="d10">
<y:ArcEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0">
<y:Point x="179.9021453857422" y="71.91300201416016"/>
</y:Path>
<y:LineStyle color="#000000" type="dashed" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:Arc height="105.62950134277344" ratio="1.0" type="fixedRatio"/>
</y:ArcEdge>
</data>
</edge>
<edge id="e17" source="n13" target="n1">
<data key="d9"/>
<data key="d10">
<y:ArcEdge>
<y:Path sx="-47.298583984375" sy="-33.387996673583984" tx="0.0" ty="0.0">
<y:Point x="968.5274658203125" y="256.1370849609375"/>
</y:Path>
<y:LineStyle color="#000000" type="dashed" width="1.0"/>
<y:Arrows source="none" target="standard"/>
<y:Arc height="453.71026611328125" ratio="4.187612533569336" type="fixedRatio"/>
</y:ArcEdge>
</data>
</edge>
</graph>
<data key="d7">
<y:Resources>
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
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 sign in to comment