# csn-aws-provisioner

> CSN Provisioner for Amazon Web Services

Latest version **0.0.2** (published 2019-07-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install csn-aws-provisioner
pnpm add csn-aws-provisioner
yarn add csn-aws-provisioner
bun add csn-aws-provisioner
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-07-24 |
| First published | 2019-07-24 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 32 |
| Unpacked size | 146.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alkira Inc. |
| Maintainers | abhinav1026 |

## Links

- npm: https://www.npmjs.com/package/csn-aws-provisioner
- npm.io page: https://npm.io/package/csn-aws-provisioner

## Dependencies (32)

- [btoa](https://npm.io/package/btoa.md) ^1.2.1
- [cors](https://npm.io/package/cors.md) ^2.8.5
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [etcd3](https://npm.io/package/etcd3.md) ^0.2.11
- [split](https://npm.io/package/split.md) ^1.0.1
- [errors](https://npm.io/package/errors.md) ^0.3.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [morgan](https://npm.io/package/morgan.md) ^1.9.1
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.451.0
- [express](https://npm.io/package/express.md) ^4.16.4
- [logform](https://npm.io/package/logform.md) ^2.1.2
- [request](https://npm.io/package/request.md) ^2.88.0
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [deepcopy](https://npm.io/package/deepcopy.md) ^2.0.0
- [kafka-node](https://npm.io/package/kafka-node.md) ^4.1.3
- [async-retry](https://npm.io/package/async-retry.md) ^1.2.3
- [await-to-js](https://npm.io/package/await-to-js.md) ^2.1.1
- [prom-client](https://npm.io/package/prom-client.md) ^11.3.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [node-rdkafka](https://npm.io/package/node-rdkafka.md) ^2.7.0
- [json-validator](https://npm.io/package/json-validator.md) 0.0.34
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.4
- [express-paginate](https://npm.io/package/express-paginate.md) ^1.0.0
- [express-validator](https://npm.io/package/express-validator.md) ^5.3.1
- [express-request-id](https://npm.io/package/express-request-id.md) ^1.4.1
- [swagger-ui-express](https://npm.io/package/swagger-ui-express.md) ^4.0.2
- [express-healthcheck](https://npm.io/package/express-healthcheck.md) ^0.1.0
- [express-prom-bundle](https://npm.io/package/express-prom-bundle.md) ^5.1.4
- [@alkiranet/node-helm](https://npm.io/package/@alkiranet/node-helm.md) 0.0.1
- [express-bearer-token](https://npm.io/package/express-bearer-token.md) ^2.4.0
- [@alkiranet/alkira-csn-aws](https://npm.io/package/@alkiranet/alkira-csn-aws.md) ^1.4.10
- [@alkiranet/node-alkira-csn-provisioning](https://npm.io/package/@alkiranet/node-alkira-csn-provisioning.md) ^1.7.0

## Recent versions

- 0.0.2 (latest) — 2019-07-24

## README

# AWS CSN Provisioning

The AWS CSN Provisioning handles Cloud Service Network deployment in Amazon Web Services. This services heavily relies on external libraries (alkira-node-libs) to manage the lifecycle of CSN, Nodes & Peering.

This app is based on `NodeJS` (ExpressJS) and uses `etcd` as the primary storage backend. This service optionally uses Kafka to process incoming requests and propagate events to other services.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

Prior to running this project on your personal computer, you will need to install Node. Version > 8 is recommended.

### Running locally (dev)

First, we need to resolve all NodeJS dependencies,

```bash
npm install
```

Then, we can run the application locally in dev mode (`NODE_ENV=dev`), make sure port 3000 is not used by another application

```bash
NODE_ENV=dev node index.js
```

### Building the project

The application is bundled as a docker container, as such you can use the following line to build it:

```bash
docker build . -t csn-aws-provisioning
```

Once built, you can use the created image to start an instance of the application.

> When built, the webserver will automatically start in production mode, as such you need to point it to an existing mongoDB database

## Deployment

The deployment of application is currently handled by Helm and the CI server by using a pipeline.

The configuration of the application can be updated in `docker-compose.yml` by passing the necessary environment variables.
The list of supported environment variables is:

- PORT: Port the application is running on | default: 3000
- ENVIRONMENT: Define the environment in which the service is running (dev, review, staging, production, ...) | No default
- NAMESPACE: Only required when running in review mode where multiple services are deployed on the same Kubernetes cluster | No default
- ETCD_HOST: ETCD endpoint FQDN (myetcd.alkira.net) | default: localhost
- ETCD_PORT: ETCD endpoint port information | default: 2379
- INTERNAL_KAFKA_BROKERS: Full kafka brokers URL (mybroker01.alkira.net:9092:mybroker02.alkira.net:9092), takes KAFKA_HOST and KAFKA_PORT precedence | default: localhost:9092
- KAFKA_HOST: Kafka endpoint FQDN, only if behind a load balancer (for bootstrap, brokers will be discovered by client) | default: localhost
- KAFKA_PORT: Kafka endpoint Port, only if behind a load balancer (for bootstrap, brokers will be discovered by client) | default: 9092
- AWS_ACCESS_KEY_ID: AWS Access Key used to manage CSN | No default
- AWS_SECRET_ACCESS_KEY: AWS Secret Key used to manage CSN| No default

Environment variables for feature flags:

- ENABLE_AUTHORIZATION: if true, REST endpoint will enforce JWT authorization | default: false
- ENABLE_EVENT_NOTIFICATIONS: if true, generate events to Kafka on CSN or Node lifecycle | default: false
- ENABLE_EVENT_TRIGGERS: if true, listens to Kafka to process CSN/Node CRUD operations | default: false

## License

This project is licensed under the Apache License - see the [LICENSE.md](LICENSE.md) file for details

---
_Source: https://npm.io/package/csn-aws-provisioner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
