This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"kind": "LimitRange", | |
"apiVersion": "v1", | |
"metadata": { | |
"name": "bs-limits" | |
}, | |
"spec":{ | |
"limits":[ | |
{ | |
"max":{"cpu":"1", "memory":"1Gi"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl create -f geolocus-namespace.json | |
$ kubectl --namespace geolocus-ns create -f bs-quota.json | |
$ kubectl --namespace geolocus-ns create -f bs-limits.json | |
$ kubectl describe limits bs-limits --namespace geolocus-ns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global credential.helper '!aws codecommit credential-helper $@' | |
git config --global credential.UseHttpPath true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module add -–name=com.mysql –-resources=mysql-connector-java-5.1.38.jar –-dependencies=javax.api,javax.transaction.api | |
/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="com.mysql",driver-class-name=com.mysql.jdbc.Driver) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void serviceChanged(ServiceEvent event) { | |
String[] objectClass = (String[]) | |
event.getServiceReference().getProperty("objectClass"); | |
if (event.getType() == ServiceEvent.REGISTERED) | |
{ | |
System.out.println( | |
"Ex1: Service of type " + objectClass[0] + " registered."); | |
} | |
else if (event.getType() == ServiceEvent.UNREGISTERING) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>org.osgi</groupId> | |
<artifactId>org.osgi.core</artifactId> | |
<version>4.2.0</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bundle-Name: Policy Service A | |
Bundle-Description: policy service for Insurer A | |
Bundle-Version: 1.0.0 | |
Bundle-Activator: com.x.policy.Activator | |
Import-Package: org.osgi.framework | |
Export-Package: com.x.policy.service | |
======================================== | |
package com.x.policy.service; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void start(BundleContext context) throws Exception { | |
System.out.println("start simple policy client"); | |
ServiceReference[] serviceReferences = context.getServiceReferences(PolicyService.class.getName(), "(Insurer=*)"); | |
if(serviceReferences != null && serviceReferences.length > 0){ | |
for(int i =0; i < serviceReferences.length; i++){ | |
PolicyService policyService = (PolicyService)context.getService(serviceReferences[i]); | |
System.out.println("Trying to find the services"); | |
if(policyService.verifyPolicy("1212")){ | |
System.out.println("Insurer A got bound at " + i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>org.osgi</groupId> | |
<artifactId>org.osgi.core</artifactId> | |
<version>4.2.0</version> | |
<scope>provided</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.eclipse.org/equinox/documents/quickstart-framework.php | |
http://download.eclipse.org/equinox/drops/R-Neon.3-201703010400/index.php | |
• somedir/ | |
○ configuration/ | |
§ config.ini | |
○ org.apache.commons.logging_1.1.1.v201101211721.jar | |
○ org.apache.felix.gogo.command_0.10.0.v201209301215.jar | |
○ org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar | |
○ org.apache.felix.gogo.shell_0.10.0.v201212101605.jar |