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

Artifactory environment parameters changed to variables #18

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@
This service provisions services for tenants of an Apache Fineract CN installation.
[Read more](https://cwiki.apache.org/confluence/display/FINERACT/Fineract+CN+Project+Structure#FineractCNProjectStructure-provisioner).

## Requirements

### Fineract CN Libraries

01. fineract-cn-lang
02. fineract-cn-postgresql
03. fineract-cn-anubis
04. fineract-cn-permitted-feign-client
05. fineract-cn-identity
06. fineract-cn-api
07. fineract-cn-async
08. fineract-cn-cassandra
09. fineract-cn-crypto
10. fineract-cn-test

### Environment Variables

The following variables are required for publishg the binary artifacts. Values are examples, change them to fit your environment.
```console
ARTIFACTORY_URL = 'https://url-to-artifactory/artifactory/libs-snapshot/'
ARTIFACTORY_URL_PUBLISH = 'https://url-to-artifactory/artifactory/'
ARTIFACTORY_USER = 'user'
ARTIFACTORY_PASSWORD = 'password'
ARTIFACTORY_REPOKEY = 'libs-snapshot-local'
```

## Abstract
Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static Tenant getCompTestTenant() {
final CassandraConnectionInfo cassandraConnectionInfo = new CassandraConnectionInfo();
compTestTenant.setCassandraConnectionInfo(cassandraConnectionInfo);
cassandraConnectionInfo.setClusterName("Test Cluster" + RandomStringUtils.randomAlphabetic(3));
cassandraConnectionInfo.setContactPoints("127.0.0.1:9142");
cassandraConnectionInfo.setContactPoints("cassandra:9042");
cassandraConnectionInfo.setKeyspace(compTestTenant.getIdentifier());
cassandraConnectionInfo.setReplicas("3");
cassandraConnectionInfo.setReplicationType("Simple");
Expand All @@ -45,7 +45,7 @@ static Tenant getCompTestTenant() {
compTestTenant.setDatabaseConnectionInfo(databaseConnectionInfo);
databaseConnectionInfo.setDriverClass("org.postgresql.Driver");
databaseConnectionInfo.setDatabaseName(compTestTenant.getIdentifier());
databaseConnectionInfo.setHost("localhost");
databaseConnectionInfo.setHost("postgres");
databaseConnectionInfo.setPort("5432");
databaseConnectionInfo.setUser("postgres");
databaseConnectionInfo.setPassword("postgres");
Expand Down
4 changes: 2 additions & 2 deletions component-test/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ system:


activemq:
brokerUrl: vm://localhost?broker.persistent=false
brokerUrl: vm://activemq?broker.persistent=false
concurrency: 3-10

spring:
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/seshat
url: jdbc:postgresql://postgres:5432/seshat
username: postgres
password: postgres
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ProvisionerActiveMQProperties {
@SuppressWarnings("unused")
final public static String ACTIVEMQ_CONCURRENCY_PROP = "activemq.concurrency";
@SuppressWarnings("WeakerAccess")
final public static String ACTIVEMQ_BROKER_URL_DEFAULT = "vm://localhost?broker.persistent=false";
final public static String ACTIVEMQ_BROKER_URL_DEFAULT = "vm://activemq?broker.persistent=false";
@SuppressWarnings("WeakerAccess")
final public static String ACTIVEMQ_CONCURRENCY_DEFAULT = "3-10";

Expand Down
8 changes: 4 additions & 4 deletions service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
defaultZone: http://eureka:8761/eureka/

server:
port: 2020
Expand All @@ -31,7 +31,7 @@ flyway:

cassandra:
clusterName: staging_cluster
contactPoints: 127.0.0.1:9042,127.0.0.2:9042,127.0.0.3:9042
contactPoints: cassandra:9042,cassandra2:9042,cassandra3:9042
replication:
default:
type: Network
Expand All @@ -40,14 +40,14 @@ cassandra:
postgresql:
driverClass: org.postgresql.Driver
database: seshat
host: localhost
host: postgres
port: 5432
user: postgres
password: postgres

spring:
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/seshat
url: jdbc:postgresql://postgres:5432/seshat
username: postgres
password: postgres
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

public class JdbcUrlBuilderTest {

private final static String POSTGRES_DB_JDBC_URL = "jdbc:postgresql:localhost:5432/comp_test";
private final static String POSTGRES_DB_JDBC_URL = "jdbc:postgresql:postgres:5432/comp_test";

public JdbcUrlBuilderTest() {
super();
Expand All @@ -33,7 +33,7 @@ public JdbcUrlBuilderTest() {
public void shouldCreatePostgresUrl() {
final String postgresDbUrl = JdbcUrlBuilder
.create(JdbcUrlBuilder.DatabaseType.POSTGRESQL)
.host("localhost")
.host("postgres")
.port("5432")
.instanceName("comp_test")
.build();
Expand Down
12 changes: 9 additions & 3 deletions shared.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ tasks.withType(JavaCompile) {
repositories {
jcenter()
mavenLocal()
maven { url 'https://mifos.jfrog.io/mifos/libs-snapshot/' }
maven {
url System.getenv("ARTIFACTORY_URL")
credentials {
username System.getenv("ARTIFACTORY_USER")
password System.getenv("ARTIFACTORY_PASSWORD")
}
}
}

dependencyManagement {
Expand Down Expand Up @@ -75,10 +81,10 @@ jar {
}

artifactory {
contextUrl = System.getenv("ARTIFACTORY_URL")
contextUrl = System.getenv("ARTIFACTORY_URL_PUBLISH")
publish {
repository {
repoKey = project.findProperty('artifactoryRepoKey')
repoKey = System.getenv("ARTIFACTORY_REPOKEY")
username = System.getenv("ARTIFACTORY_USER")
password = System.getenv("ARTIFACTORY_PASSWORD")
}
Expand Down