https://github.com/alexfalkowski/infraops
A place where all infrastructure is taken care of.
https://github.com/alexfalkowski/infraops
cloudflare digitalocean github golang k8s
Last synced: 5 months ago
JSON representation
A place where all infrastructure is taken care of.
- Host: GitHub
- URL: https://github.com/alexfalkowski/infraops
- Owner: alexfalkowski
- License: unlicense
- Created: 2023-11-20T20:15:57.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-08-30T05:11:06.000Z (5 months ago)
- Last Synced: 2025-08-30T05:31:29.475Z (5 months ago)
- Topics: cloudflare, digitalocean, github, golang, k8s
- Language: Go
- Homepage: https://alexfalkowski.github.io/infraops
- Size: 3.68 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://circleci.com/gh/alexfalkowski/infraops)
[](https://codecov.io/gh/alexfalkowski/infraops)
[](https://goreportcard.com/report/github.com/alexfalkowski/infraops/v2)
[](https://pkg.go.dev/github.com/alexfalkowski/infraops/v2)
[](https://masterminds.github.io/stability/active.html)
A place where all infrastructure is taken care of.
## Background
The following tools are used:
-
-
-
-
## Configuration
The configuration follows the [prototext](https://protobuf.dev/reference/protobuf/textformat-spec/) format.
### Format
Build the application:
```bash
❯ make build-format
```
To format a configuration:
```bash
❯ ./format -k cf -p area/cf/cf.pbtxt
```
## Areas
Each folder takes care of an area of infrastructure. Each area has a package that is used as the entry point, so it is a [facade](https://en.wikipedia.org/wiki/Facade_pattern).
### Areas Setup
To setup a new area follow the following:
- Run `pulumi new`.
- Choose the template you need, if in doubt choose `go`.
- The stack name should always be `prod`.
### Areas Configuration
Each area is defined by the configuration that is generated from the [protobuf](api/infraops/v1/service.proto) and the format used is the [Text Format](https://protobuf.dev/reference/protobuf/textformat-spec/).
### Applications (apps)
This consists of my open source projects being deployed to kubernetes.
#### Applications Install
The above is for a new application. If you want to setup all current apps, run the following.
```bash
❯ make -C area/apps setup
```
#### Applications Delete
To remove all the apps, you need to run the following:
```bash
❯ make -C area/apps delete
```
#### Applications Configuration
Have a look at the [configuration](area/apps/apps.pbtxt).
#### Applications Version Update
Build the application:
```bash
❯ make build-bump
```
To update a version of an app:
```bash
❯ ./bump -n bezeichner -v 1.559.0 -p area/apps/apps.pbtxt
```
### Cloudflare (cf)
The code is bases on the package .
#### Cloudflare Configuration
Have a look at the [configuration](area/cf/cf.pbtxt).
### DigitalOcean (do)
The code is bases on the package .
#### DigitalOcean Project
Create manually a default project with a name and description, example:
| Name | Description |
| ------------- | ------------------------------------- |
| lean-thoughts | All of experiments for lean-thoughts. |
#### DigitalOcean VPC
The account needs a default VPC. Create one manually under the region you would like with a name and description, example:
| Name | Description |
| ------------ | ------------------------- |
| default-fra1 | The default vpc for fra1. |
#### DigitalOcean Cluster Upgrade
The process is as follows:
- Patch versions can be updated at [do.go](internal/do/do.go).
- Minor/major versions should be updated in the [UI](https://docs.digitalocean.com/products/kubernetes/how-to/upgrade-cluster/) and then updated at [do.go](internal/do/do.go).
#### DigitalOcean Configuration
Have a look at the [configuration](area/do/do.pbtxt).
### GitHub (gh)
The code is based on the package .
The original idea was inspired from .
#### GitHub Creation
There is a caveat when creating repositories, that requires a 2 step process.
##### GitHub Pages
Pages can only be created after the repository is present.
So, the first step is to disable it or leave pages out.
```pbtxt
pages: {
enabled: false
}
```
Then the second PR, we enable it:
```pbtxt
pages: {
enabled: true
}
```
If this repository will be used to host site with a cname, we need to add this:
```pbtxt
pages: {
enabled: true
cname: "www.yoursite.com"
}
```
> [!NOTE]
> The reason for this is that there seems to be a timing issue with creating the `master` branch.
##### GitHub Collaborators
As with pages the repository needs to be present.
So, the first step is to have:
```pbtxt
collaborators: {
enabled: false
}
```
Then the second PR, we set it to:
```pbtxt
collaborators: {
enabled: true
}
```
> [!NOTE]
> This also seems like a timing issue, as rerunning the pipeline fixes it.
#### GitHub Configuration
Have a look at the [configuration](area/gh/gh.pbtxt).
### Kubernetes (k8s)
This contains all the packages our cluster needs.
> [!CAUTION]
> This needs to be run once you have a cluster in DigitalOcean.
#### Kubernetes Setup
To ge the cluster ready, you need to run the following:
```bash
❯ make -C area/k8s setup
```
#### Kubernetes Delete
To remove all the apps, you need to run the following:
```bash
❯ make -C area/k8s delete
```
### Dependencies
