Skip to content

Commit

Permalink
docs: Update DEVELOPERS.md (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord authored Dec 6, 2023
1 parent 6986e85 commit ccdc9ef
Showing 1 changed file with 45 additions and 10 deletions.
55 changes: 45 additions & 10 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,53 @@
# Docs for Developers

The entire monorepo is managed by [moon](https://moonrepo.dev/).
The entire monorepo is managed by [Earthly](https://earthly.dev).
And you need [direnv](https://direnv.net/).

## How to install deps
```shell
go install github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/onsi/ginkgo/v2/[email protected]
```


## Generate SDK with Moon and Speakeasy
## How to start developing
To use Earthly and dev environments in Kubernetes, you need the following environment variables (in .direnv/.env):
Environment variables are split into several pieces:
- Project config: License of the various tools used in the repository (Not required for local development)
- SPEAKEASY_API_KEY: License for [Speakeasy](https://www.speakeasyapi.dev/)
- GITHUB_TOKEN: Github token for actions
- GORELEASER_KEY: Github token for releases
- vCluster config:
- FORMANCE_DEV_KUBE_TOKEN: Kubernetes token for dev cluster access
- FORMANCE_DEV_KUBE_API_SERVER_ADDRESS: dev cluster address
- FORMANCE_DEV_TLD: dev domain to access the stack
- FORMANCE_DEV_GHCR_REGISTRY: Registry for images
- FORMANCE_DEV_USER: Your username
- Admin config: only for our DNS configuration with Route53
- FORMANCE_AWS_KEY_ID: AWS Key ID
- FORMANCE_AWS_SECRET_KEY: AWS Secret Key

Once you have configured all the following elements, you can run the following commands to deploy the various components:
```bash
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component traefik
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component cert-manager
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component postgres
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component elasticsearch
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component otel-collector
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component nats
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component jaeger
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component goproxy
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component ghcr-registry
earthly -P --push github.com/formancehq/earthly/bootstrap/+deploy-base-component --component buildkitd
```
moon run openapi:build
You can now start deploying all components.
```bash
earthly -P --push +deploy-all
```

## How to deploy a new version of components
There are several ways to deploy a component:
- Deploy all components
- Deploy a specific component
### Deploy all components
```bash
earthly -P --push +deploy-all
```

### Deploy a specific component
```bash
earthly -P --push +deploy --component <component_name>
```

1 comment on commit ccdc9ef

@vercel
Copy link

@vercel vercel bot commented on ccdc9ef Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.