Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/place1/kloudlib
https://github.com/place1/kloudlib
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/place1/kloudlib
- Owner: Place1
- License: mit
- Created: 2019-02-10T02:56:35.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-15T20:51:17.000Z (over 1 year ago)
- Last Synced: 2024-10-29T14:58:21.408Z (about 1 month ago)
- Language: TypeScript
- Size: 2.28 MB
- Stars: 33
- Watchers: 6
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pulumi - `place1/kloudlib` - A collection of NPM libraries for deploying commonly used open source software to Kubernetes using Pulumi. (Libraries / Miscellaneous)
README
# kloudlib
Kloudlib is a collection of NPM libraries for deploying commonly used
open source software to Kubernetes using Pulumi.## Documentation
[https://place1.github.io/kloudlib/](https://place1.github.io/kloudlib/)
## Installation
Kloudlib distributes each service as a seperate package.
```bash
npm install --save @kloudlib/
```Distributing each service as a seperate NPM package means you only need to
install what you use and each package is versioned separately.## What does it look like?
So you've got a new cluster and now you want to deploy nginx-ingress with
cert-manager for automatic TLS.Here's how we can setup Nginx Ingress and Cert Manager with Kloudlib:
```typescript
import { NginxIngress } from '@kloudlib/nginx-ingress';
import { CertManager } from '@kloudlib/cert-manager';new NginxIngress('nginx-ingress', {
mode: {
kind: 'Deployment',
loadBalancerIP: 'x.x.x.x',
replicas: 2,
},
});new CertManager('cert-manager', {
useStagingACME: true,
acme: {
email: '[email protected]',
},
});
```Now you might like some monitoring for this cluster so let's deploy Prometheus/Loki/Grafana
for an all-in-one logs and metrics solution:```typescript
import * as k8s from '@pulumi/kubernetes';
import { GrafanaStack } from '@kloudlib/grafana-stack';// Let's deploy grafana-stack into it's own namespace.
const ns = new k8s.core.Namespace('monitoring', {
metadata: {
name: 'monitoring',
},
});// GrafanaStack includes prometheus and loki and automaticall
// configures them together.
new GrafanaStack('grafana-stack', {
namespace: ns.metadata.name,
grafana: {
ingress: {
hosts: ['grafana.example.com'],
},
},
});
```## Contributing A New Package
Contributions are very much welcome. Kloudlib is intended to be a
library for the community by the community.Here's how you can get started:
1. Clone the repository
2. Install the dependencies in the root folder: `npm install`
3. Bootstrap the repo: `npm run bootstrap`
4. Generate your new package using: `./create-package.sh `
* for example: `./create-package.sh nginx-ingress`
5. Implement your Pulumi code!When you're done, you can run `npm run build` from your package's folder
or from the root folder (to build everything).To test out your new package before submitting a PR you can use `npm link`
to install it in a local Pulumi project.