mirror of
https://github.com/apache/nifi.git
synced 2025-02-07 10:38:33 +00:00
NIFI-10578 Fix minifi-c2 unsecure integrations tests
This closes #6475 Signed-off-by: Ferenc Erdei <erdei.ferenc90@gmail.com>
This commit is contained in:
parent
f65888dc5c
commit
bf3cfdcf33
@ -38,7 +38,7 @@ When using the `CacheConfigurationProvider`, by default, the server will look fo
|
||||
|
||||
The pattern can be configured in [./conf/minifi-c2-context.xml](./minifi-c2-assembly/src/main/resources/conf/minifi-c2-context.xml) and the default value (${class}/config) will replace ${class} with the class query parameter and then look for CLASS/config.CONTENT_TYPE.vVERSION in the directory structure.
|
||||
|
||||
Ex: http://localhost:10080/c2/config?class=raspi&version=1 with an Accept header that matches text/yml would result in [./files/raspi3/config.text.yml.v1](./minifi-c2-assembly/src/main/resources/files/raspi3/config.text.yml.v1) and omitting the version parameter would look for the highest version number in the directory.
|
||||
Ex: http://localhost:10090/c2/config?class=raspi&version=1 with an Accept header that matches text/yml would result in [./files/raspi3/config.text.yml.v1](./minifi-c2-assembly/src/main/resources/files/raspi3/config.text.yml.v1) and omitting the version parameter would look for the highest version number in the directory.
|
||||
|
||||
The version resolution is cached in memory to accommodate many devices polling periodically. The cache duration can be configured with additional arguments in [./conf/minifi-c2-context.xml](../minifi-integration-tests/src/test/resources/c2/hierarchical/c2-edge2/conf/minifi-c2-context.xml#L55) that call the [overloaded constructor.](./minifi-c2-service/src/main/java/org/apache/nifi/minifi/c2/service/ConfigService.java#L81)
|
||||
|
||||
|
@ -48,7 +48,7 @@ RUN chown -R c2:c2 $MINIFI_C2_HOME
|
||||
USER c2
|
||||
|
||||
#Default http port
|
||||
EXPOSE 10080
|
||||
EXPOSE 10090
|
||||
|
||||
# Startup MiNiFi C2
|
||||
CMD $MINIFI_C2_HOME/bin/c2.sh
|
||||
|
@ -38,7 +38,7 @@ RUN chown -R c2:c2 $MINIFI_C2_HOME
|
||||
USER c2
|
||||
|
||||
#Default http port
|
||||
EXPOSE 10080
|
||||
EXPOSE 10090
|
||||
|
||||
# Startup MiNiFi c2
|
||||
CMD $MINIFI_C2_HOME/bin/c2.sh run
|
||||
|
@ -36,7 +36,7 @@ public abstract class AbstractTestUnsecure {
|
||||
protected String c2Url;
|
||||
|
||||
public static String getUnsecureConfigUrl(Container container) {
|
||||
DockerPort dockerPort = container.port(10080);
|
||||
DockerPort dockerPort = container.port(10090);
|
||||
return "http://" + dockerPort.getIp() + ":" + dockerPort.getExternalPort() + "/c2/config";
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<value>http://c2-upstream:10080</value>
|
||||
<value>http://c2-upstream:10090</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</list>
|
||||
|
@ -19,14 +19,14 @@ services:
|
||||
c2-upstream:
|
||||
image: apacheminific2:${minifi.c2.version}
|
||||
ports:
|
||||
- "10080"
|
||||
- "10090"
|
||||
hostname: c2-upstream
|
||||
volumes:
|
||||
- ./c2/files:/opt/minifi-c2/minifi-c2-${minifi.c2.version}/files
|
||||
c2:
|
||||
image: apacheminific2:${minifi.c2.version}
|
||||
ports:
|
||||
- "10080"
|
||||
- "10090"
|
||||
hostname: c2
|
||||
volumes:
|
||||
- ./c2-unsecure-delegating/conf/minifi-c2-context.xml:/opt/minifi-c2/minifi-c2-${minifi.c2.version}/conf/minifi-c2-context.xml
|
||||
|
@ -19,7 +19,7 @@ services:
|
||||
c2:
|
||||
image: apacheminific2:${minifi.c2.version}
|
||||
ports:
|
||||
- "10080"
|
||||
- "10090"
|
||||
hostname: c2
|
||||
volumes:
|
||||
- ./c2/files:/opt/minifi-c2/minifi-c2-${minifi.c2.version}/files
|
@ -19,7 +19,7 @@ services:
|
||||
c2:
|
||||
image: apacheminific2:${minifi.c2.version}
|
||||
ports:
|
||||
- "10080"
|
||||
- "10090"
|
||||
hostname: c2
|
||||
volumes:
|
||||
- ./c2-unsecure-rest/conf/minifi-c2-context.xml:/opt/minifi-c2/minifi-c2-${minifi.c2.version}/conf/minifi-c2-context.xml
|
||||
|
@ -56,7 +56,7 @@ public class JettyServer {
|
||||
}
|
||||
|
||||
Server server;
|
||||
int port = Integer.parseInt(properties.getProperty("minifi.c2.server.port", "10080"));
|
||||
int port = Integer.parseInt(properties.getProperty("minifi.c2.server.port", "10090"));
|
||||
if (properties.isSecure()) {
|
||||
SslContextFactory sslContextFactory = properties.getSslContextFactory();
|
||||
HttpConfiguration config = new HttpConfiguration();
|
||||
|
@ -15,7 +15,7 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
minifi.c2.server.port=10080
|
||||
minifi.c2.server.port=10090
|
||||
|
||||
minifi.c2.server.secure=false
|
||||
minifi.c2.server.keystore=./conf/keystore.jks
|
||||
|
@ -53,7 +53,7 @@ nifi.minifi.notifier.ingestors=org.apache.nifi.minifi.bootstrap.configuration.in
|
||||
# Hostname on which to pull configurations from
|
||||
nifi.minifi.notifier.ingestors.pull.http.hostname=c2-edge2
|
||||
# Port on which to pull configurations from
|
||||
nifi.minifi.notifier.ingestors.pull.http.port=10080
|
||||
nifi.minifi.notifier.ingestors.pull.http.port=10090
|
||||
# Path to pull configurations from
|
||||
nifi.minifi.notifier.ingestors.pull.http.path=/c2/config
|
||||
# Query string to pull configurations with
|
||||
|
@ -66,7 +66,7 @@ services:
|
||||
dockerfile: Dockerfile.minific2.test
|
||||
image: apacheminific2-test
|
||||
ports:
|
||||
- "10080"
|
||||
- "10090"
|
||||
hostname: c2-edge2
|
||||
volumes:
|
||||
- ./c2/hierarchical/c2-edge2/conf/c2.properties:/opt/minifi-c2/minifi-c2-${minifi.c2.version}/conf/c2.properties
|
||||
|
Loading…
x
Reference in New Issue
Block a user