diff --git a/lattice.yaml b/lattice.yaml new file mode 100644 index 0000000..ea09e3c --- /dev/null +++ b/lattice.yaml @@ -0,0 +1,37 @@ +type: v1/system + +node_pools: + foo: + instance_type: t2.large + num_instances: 2 + +components: + aggregator: + type: v1/reference + + git_repository: + url: https://github.com/mlab-lattice/testing__version-aggregator-service.git + version: 1.0.x + file: lattice.json + + parameters: + node_pool: /:foo + num_instances: 1 + + service: + type: v1/reference + + git_repository: + url: https://github.com/mlab-lattice/testing__version-service.git + version: 1.x + + parameters: + node_pool: /:foo + + ubuntu: + type: v1/job + build: + type: docker_image + repository: library/ubuntu + tag: "18.04" + node_pool: /:foo diff --git a/parameter-dynamic-version-service.json b/parameter-dynamic-version-service.json deleted file mode 100644 index 63e05df..0000000 --- a/parameter-dynamic-version-service.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$parameters": { - "NAME": { "required": true }, - "VERSION": { "required": true }, - "PUBLIC": { "required": true }, - "NUM_INSTANCES": { "default": 1 }, - "INSTANCE_TYPE": { "default": "t2.micro" } - }, - - "type": "service", - "name": "${NAME}", - - "components": [ - { - "name": "service", - "ports": [ - { - "name": "http", - "port": 8080, - "protocol": "HTTP", - "external_access": { - "public": "${PUBLIC}" - } - } - ], - "build": { - "git_repository": { - "url": "https://github.com/mlab-lattice/testing__version-service.git", - "tag": "dynamic" - }, - "language": "node:boron", - "command": "npm install" - }, - "exec": { - "command": [ - "node", - "VersionService.js" - ], - "environment": { - "PORT": "8080", - "VERSION": "${VERSION}" - } - }, - "health_check": { - "http": { - "port": "http", - "path": "/status" - } - } - } - ], - "resources": { - "num_instances": "${NUM_INSTANCES}", - "instance_type": "${INSTANCE_TYPE}" - } -} \ No newline at end of file diff --git a/secret-dynamic-version-service.json b/secret-dynamic-version-service.json deleted file mode 100644 index 91616d6..0000000 --- a/secret-dynamic-version-service.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$parameters": { - "NAME": { "required": true }, - "PUBLIC": { "required": true }, - "NUM_INSTANCES": { "default": 1 }, - "INSTANCE_TYPE": { "default": "t2.micro" } - }, - - "type": "service", - "name": "${NAME}", - - "secrets": { - "version": {} - }, - - "components": [ - { - "name": "service", - "ports": [ - { - "name": "http", - "port": 8080, - "protocol": "HTTP", - "external_access": { - "public": "${PUBLIC}" - } - } - ], - "build": { - "git_repository": { - "url": "https://github.com/mlab-lattice/testing__version-service.git", - "tag": "dynamic" - }, - "language": "node:boron", - "command": "npm install" - }, - "exec": { - "command": [ - "node", - "VersionService.js" - ], - "environment": { - "PORT": "8080", - "VERSION": { "secret": "version" } - } - }, - "health_check": { - "http": { - "port": "http", - "path": "/status" - } - } - } - ], - "resources": { - "num_instances": "${NUM_INSTANCES}", - "instance_type": "${INSTANCE_TYPE}" - } -} \ No newline at end of file diff --git a/static-version-service.json b/static-version-service.json deleted file mode 100644 index 5311bb2..0000000 --- a/static-version-service.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$parameters": { - "NAME": { "required": true }, - "TAG": { "required": true}, - "PUBLIC": { "required": true }, - "NUM_INSTANCES": { "default": 1 }, - "INSTANCE_TYPE": { "default": "t2.micro" } - }, - - "type": "service", - "name": "${NAME}", - - "components": [ - { - "name": "service", - "ports": [ - { - "name": "http", - "port": 8080, - "protocol": "HTTP", - "external_access": { - "public": "${PUBLIC}" - } - } - ], - "build": { - "git_repository": { - "url": "https://github.com/mlab-lattice/testing__version-service.git", - "tag": "${TAG}" - }, - "language": "node:boron", - "command": "npm install" - }, - "exec": { - "command": [ - "node", - "VersionService.js" - ], - "environment": { - "PORT": "8080" - } - }, - "health_check": { - "http": { - "port": "http", - "path": "/status" - } - } - } - ], - "resources": { - "num_instances": "${NUM_INSTANCES}", - "instance_type": "${INSTANCE_TYPE}" - } -} \ No newline at end of file diff --git a/system.json b/system.json deleted file mode 100644 index b50e8e7..0000000 --- a/system.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "system", - "name": "test", - - "subsystems": [ - { - "$include": { - "url": "static-version-service.json", - "parameters": { - "NAME": "a", - "TAG": "1.0.0", - "PUBLIC": true - } - } - } - ] -} \ No newline at end of file diff --git a/version-aggregator-service.json b/version-aggregator-service.json deleted file mode 100644 index f019ba0..0000000 --- a/version-aggregator-service.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$parameters": { - "NAME": { "required": true }, - "TAG": { "required": true}, - "PUBLIC": { "required": true }, - "NUM_INSTANCES": { "default": 1 }, - "INSTANCE_TYPE": { "default": "t2.micro" } - }, - - "type": "service", - "name": "${NAME}", - - "components": [ - { - "name": "service", - "ports": [ - { - "name": "http", - "port": 8080, - "protocol": "HTTP", - "external_access": { - "public": "${PUBLIC}" - } - } - ], - "build": { - "git_repository": { - "url": "https://github.com/mlab-lattice/testing__version-aggregator-service.git", - "tag": "${TAG}" - }, - "language": "node:boron", - "command": "npm install" - }, - "exec": { - "command": [ - "node", - "VersionAggregatorService.js" - ], - "environment": { - "PORT": "8080" - } - }, - "health_check": { - "http": { - "port": "http", - "path": "/status" - } - } - } - ], - "resources": { - "num_instances": "${NUM_INSTANCES}", - "instance_type": "${INSTANCE_TYPE}" - } -} \ No newline at end of file