Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
g3kk0 committed Sep 11, 2017
2 parents 407d682 + 6bab7af commit 7d1fc48
Show file tree
Hide file tree
Showing 124 changed files with 727 additions and 957 deletions.
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ dependencies:
- $ROOTPATH/ernest/internal/ci_install_service.sh r3labs composable master
- $ROOTPATH/ernest/internal/ci_install_service.sh ernestio ernest-cli $CLI_VERSION
- mkdir /tmp/composable
- composable set build.path /tmp/composable
- sed -i "s:443 ssl:80:g" $ROOTPATH/ernest/config/nginx/ernest.local
- sed -i "s:ERNESTHOST:ernest.local:g" $ROOTPATH/ernest/config/nginx/ernest.local
- sed -i "/ssl_certificate/d" $ROOTPATH/ernest/config/nginx/ernest.local
- sed -i "s:443:80:g" $ROOTPATH/ernest/template.yml
- cd $ROOTPATH/ernest && composable gen -E ERNEST_CRYPTO_KEY=$ERNEST_CRYPTO_KEY -exclude='*-aws-connector,*-vcloud-connector' -G $BASE_VERSION $EXTRA_OPTIONS definition.yml template.yml --
- cd $ROOTPATH/ernest && composable generate -E ERNEST_CRYPTO_KEY=$ERNEST_CRYPTO_KEY -exclude='*-aws-connector,*-vcloud-connector' -G $BASE_VERSION $EXTRA_OPTIONS definition.yml template.yml --
- cd $ROOTPATH/ernest && docker-compose -f docker-compose.yml up -d
- cd $ROOTPATH/ernest && docker-compose logs > /tmp/compose.log:
background: true
Expand All @@ -50,4 +51,3 @@ dependencies:
test:
override:
- cd $ROOTPATH/ernest && make test

60 changes: 4 additions & 56 deletions config/config-store/config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"redis": {
"addr": "redis:6379",
"password": "",
"DB": 0
"authenticator": {
"providers": [
{"type": "local"}
]
},
"postgres": {
"names": [
Expand All @@ -27,57 +27,5 @@
"logger": {
"host": "",
"port": "22001"
},
"connectors": {
"routers": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake",
"azure",
"azure-fake"
],
"networks": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"instances": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"firewalls": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"nats": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"elbs": [
"fake",
"aws",
"aws-fake"
],
"executions": [
"fake",
"salt"
]
},
"salt": {
"user": "salt",
"password": "33Arma33"
}
}
53 changes: 32 additions & 21 deletions definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ repos:
- nats
ports:
- 8080:8080
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
JWT_SECRET: 'GENERATEDJWTSECRET'
ERNEST_CRYPTO_KEY: CRYPTO_KEY_TEMPLATE

- name: authenticator
path: [email protected]:ernestio/authenticator.git
branch: master
links:
- nats
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -33,7 +45,7 @@ repos:
- nats
ports:
- 22000:22000
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -45,52 +57,51 @@ repos:
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
ERNEST_CRYPTO_KEY: CRYPTO_KEY_TEMPLATE

- name: group-store
path: [email protected]:ernestio/group-store.git
- name: datacenter-store
path: [email protected]:ernestio/datacenter-store.git
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
ERNEST_CRYPTO_KEY: CRYPTO_KEY_TEMPLATE

- name: datacenter-store
path: [email protected]:ernestio/datacenter-store.git
- name: service-store
path: [email protected]:ernestio/service-store.git
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
ERNEST_CRYPTO_KEY: CRYPTO_KEY_TEMPLATE

- name: service-store
path: [email protected]:ernestio/service-store.git
- name: authorization-store
path: [email protected]:ernestio/authorization-store.git
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
ERNEST_CRYPTO_KEY: CRYPTO_KEY_TEMPLATE


- name: usage-store
path: [email protected]:ernestio/usage-store.git
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -102,7 +113,7 @@ repos:
links:
- nats
- postgres
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -114,7 +125,7 @@ repos:
links:
- nats
- postgres
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -125,7 +136,7 @@ repos:
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -137,7 +148,7 @@ repos:
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -148,7 +159,7 @@ repos:
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -159,7 +170,7 @@ repos:
branch: master
links:
- nats
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand All @@ -173,7 +184,7 @@ repos:
- nats
ports:
- 22001:22001
depends:
depends_on:
- config-store
environment:
NATS_URI: 'nats://nats:4222'
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ services:
ERNEST_CRYPTO_KEY: CRYPTO_KEY_TEMPLATE
JWT_SECRET: GENERATEDJWTSECRET
NATS_URI: nats://nats:4222
authenticator:
image: ernestio/authenticator:2.1.0
links:
- nats
depends_on:
- config-store
environment:
ERNEST_CRYPTO_KEY: CRYPTO_KEY_TEMPLATE
JWT_SECRET: GENERATEDJWTSECRET
NATS_URI: nats://nats:4222
config-store:
image: ernestio/config-store:2.2.0
entrypoint: /go/bin/config-store -config /etc/ernest/config.json
Expand Down
11 changes: 4 additions & 7 deletions internal/ci_setup.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
$GOBIN/natsc request -s $NATS_URI -t 5 -r 99 'group.set' '{"id":"1","name": "ci_admin"}'
$GOBIN/natsc request -s $NATS_URI -t 5 -r 99 'user.set' '{"group_id": 1, "username": "ci_admin", "password": "secret123", "admin":true}'
$GOBIN/natsc request -s $NATS_URI -t 5 -r 99 'user.set' '{"username": "ci_admin", "password": "secret123", "type": "local", "admin":true}'
ernest-cli target $CURRENT_INSTANCE
ernest-cli login --user ci_admin --password secret123
ernest-cli user create usr secret123
ernest-cli group create test
ernest-cli group add-user usr test
ernest-cli login --user usr --password secret123
ernest-cli datacenter create aws fakeaws --region fake --secret_access_key fake_up_to_16_characters --access_key_id up_to_16_characters_secret --fake
ernest-cli datacenter create vcloud fakevcloud -org test -user fakeuser -password test123 -public-network test-nw -vcloud-url https://vcloud.net --fake
ernest-cli datacenter create azure --subscription_id subid --client_id cliid --client_secret clisec --region westus --tenant_id tenid --environment public --fake fakeazure
ernest-cli project create aws fakeaws --region fake --secret_access_key fake_up_to_16_characters --access_key_id up_to_16_characters_secret --fake
ernest-cli project create vcloud fakevcloud -org test -user fakeuser -password test123 -public-network test-nw -vcloud-url https://vcloud.net --fake
ernest-cli project create azure --subscription_id subid --client_id cliid --client_secret clisec --region westus --tenant_id tenid --environment public --fake fakeazure
50 changes: 0 additions & 50 deletions internal/config.tmp.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"redis": {
"addr": "redis:6379",
"password": "",
"DB": 0
},
"postgres": {
"names": [
"users",
Expand All @@ -23,50 +18,5 @@
"monitor": {
"host": "127.0.0.1",
"port": "22000"
},
"connectors": {
"routers": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"networks": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"instances": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"firewalls": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"nats": [
"fake",
"vcloud",
"vcloud-fake",
"aws",
"aws-fake"
],
"executions": [
"fake",
"salt"
]
},
"salt": {
"user": "salt",
"password": "---"
}
}
2 changes: 1 addition & 1 deletion internal/definitions/aws-template1-completed.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: aws-test-4
datacenter: tom-aws
project: tom-aws
bootstrapping: none
vpc_id: vpc-a921accd
networks:
Expand Down
2 changes: 1 addition & 1 deletion internal/definitions/aws-template1-unexisting.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: aws-test-999
datacenter: fakeaws
project: fakeaws
bootstrapping: none
vpc_id: vpc-a921accd
networks:
Expand Down
2 changes: 1 addition & 1 deletion internal/definitions/aws-template1.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: aws-test-4
datacenter: tom-aws
project: tom-aws
bootstrapping: none
vpc_id: vpc-a921accd
networks:
Expand Down
2 changes: 1 addition & 1 deletion internal/definitions/aws1.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Basic aws example
---
name: my_service
datacenter: r3-dc2
project: r3-dc2

vpcs:
- name: test-vpc
Expand Down
2 changes: 1 addition & 1 deletion internal/definitions/aws10.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Add a network and attach a new instance
---
name: my_service
datacenter: r3-dc2
project: r3-dc2

vpcs:
- name: test-vpc
Expand Down
2 changes: 1 addition & 1 deletion internal/definitions/aws11.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Remove a network and remove the new instance
---
name: my_service
datacenter: r3-dc2
project: r3-dc2

vpcs:
- name: test-vpc
Expand Down
2 changes: 1 addition & 1 deletion internal/definitions/aws12.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Add a nat gateway and attach a private network to it
---
name: my_service
datacenter: r3-dc2
project: r3-dc2

vpcs:
- name: test-vpc
Expand Down
Loading

0 comments on commit 7d1fc48

Please sign in to comment.