Skip to content

Commit

Permalink
feat: Carvel Package the easy way (#29)
Browse files Browse the repository at this point in the history
* refactor: Easy vs Hard
* docs: Update tabs
* docs: Improve carvel tutorial
* docs: mmmm, fresh tutorials
* docs: This will do for now
  • Loading branch information
MAHDTech committed Jan 16, 2024
1 parent da3dd3f commit 5f89488
Show file tree
Hide file tree
Showing 40 changed files with 1,555 additions and 280 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/wrangler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
if: |
env.BRANCH_NAME_CURRENT != env.BRANCH_NAME_DEFAULT &&
steps.hugo_build_staging.outcome == 'success'
uses: cloudflare/[email protected].0
uses: cloudflare/[email protected].1
with:
environment: staging
apiToken: ${{ env.WRANGLER_API_TOKEN }}
Expand All @@ -148,7 +148,7 @@ jobs:
if: |
env.BRANCH_NAME_CURRENT == env.BRANCH_NAME_DEFAULT &&
steps.hugo_build_production.outcome == 'success'
uses: cloudflare/[email protected].0
uses: cloudflare/[email protected].1
with:
environment: production
apiToken: ${{ env.WRANGLER_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ It can get a little confusing, so here's a table to track the weights.
| Search | 1 |
| Frameworks | 1000-1999 |
| Technologies | 2000-2999 |
| Guides | 3000-3999 |
| Tutorials | 3000-3999 |
10 changes: 9 additions & 1 deletion content/changelog/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@ draft: false

### January 2024

Fixed a bunch of broken links thanks to the only person who has ever contacted me about them being broken. Thanks! 👍
Fixed broken links and added a new Carvel tutorial.

Special thanks to the person who contacted me about them being broken, at least someone is reading this! 👍 😄

{{< changelog "Fixed" >}}

- Fixed broken links.

{{</ changelog >}}

{{< changelog "Added" >}}

- Added a Carvel package tutorial the "easy way"

{{</ changelog >}}

### November 2023

Added an awesome Carvel YouTube video from Thomas Vitale.
Expand Down
5 changes: 5 additions & 0 deletions content/technologies/harbor/rotate_certs.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ Harbor certificate rotation steps.
- Stop the Harbor service

```bash
# Stop the systemd unit.
sudo systemctl stop harbor
```

- Backup the existing certificates

```bash
# Create a directory
sudo mkdir -p ${HOME}/backup/$(date +%Y%m%d)

# Copy the files
sudo cp /storage/data/secret/cert/server.crt ${HOME}/backup/$(date +%Y%m%d)/server.crt
sudo cp /storage/data/secret/cert/server.key ${HOME}/backup/$(date +%Y%m%d)/server.key
sudo cp /storage/data/secret/cert/ca.crt ${HOME}/backup/$(date +%Y%m%d)/ca.crt
Expand All @@ -36,6 +39,7 @@ sudo cp /storage/data/secret/cert/ca.crt ${HOME}/backup/$(date +%Y%m%d)/ca.crt
# Place the new certificates in the ${HOME}/certs directory
sudo mkdir -p "${HOME}/certs"

# Copy the files
sudo cp "${HOME}/certs/server.crt" /storage/data/secret/cert/server.crt
sudo cp "${HOME}/certs/server.key" /storage/data/secret/cert/server.key
sudo cp "${HOME}/certs/ca.crt" /storage/data/secret/cert/ca.crt
Expand All @@ -44,5 +48,6 @@ sudo cp "${HOME}/certs/ca.crt" /storage/data/secret/cert/ca.crt
- Start the Harbor service

```bash
# Start the system unit
sudo systemctl start harbor
```
4 changes: 3 additions & 1 deletion content/technologies/salt-project/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ One example is `test.ping` which returns `True` if the Salt Minion is responding
Example usage

```bash
# Check which hosts are alive.
salt '*' test.ping
```

Expand All @@ -67,7 +68,8 @@ Salt Runners, invoked from `salt-run` are similar to Salt Execution modules exce

Salt States describe the desired state of a specific part of a targeted system. For example the following state ensure that a file is present on the system

```bash
```yaml
# Example
Ensure hosts file present:
file.present:
- name: /etc/hosts
Expand Down
20 changes: 10 additions & 10 deletions content/tutorials/carvel/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date: 2021-01-20T15:00:00+10:00
icon: "fas fa-tools"
description: "Carvel tutorials and training material."
type: "docs"
weight: 3203
weight: 3300
draft: false
---

Expand All @@ -16,15 +16,15 @@ _Carvel_, formally known as _k14s_, is a Kubernetes toolchain comprised of indiv

Information and tutorial on the toolchain components.

| Link | Description |
| ---------------------------------- | ---------------------------------------- |
| [vendir](vendir) | Getting started with `vendir` |
| [ytt](ytt) | Getting started with `ytt` |
| [kbld](kbld) | Getting started with `kbld` |
| [imgpkg](imgpkg) | Getting started with `imgpkg` |
| [kapp](kapp) | Getting started with `kapp` |
| [kapp-controller](kapp-controller) | Getting started with `kapp-controller` |
| [tutorial](tutorial) | Create a Carvel Package _"the hard way"_ |
| Link | Description |
| ---------------------------------- | -------------------------------------- |
| [vendir](vendir) | Getting started with `vendir` |
| [ytt](ytt) | Getting started with `ytt` |
| [kbld](kbld) | Getting started with `kbld` |
| [imgpkg](imgpkg) | Getting started with `imgpkg` |
| [kapp](kapp) | Getting started with `kapp` |
| [kapp-controller](kapp-controller) | Getting started with `kapp-controller` |
| [packages](packages) | Working with Carvel Packages |

## Resources

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions content/tutorials/carvel/packages/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "Packages"
date: 2021-03-01T00:00:00+00:00
icon: "fa-solid fa-box"
description: "Working with Carvel packages"
type: "docs"
weight: 3308
draft: false
---

## Overview

Once you know about the individual tools, it's time to look at how to combine them.

The carvel toolchain has a clear separation between the `Package Author` and `Package Consumer` personas.

- `Package Authors` create and publish Carvel packages.
- `Package Consumers` deploy and update Carvel packages is running clusters.

Depending on your team size and responsibilities you might wear both hats 🤠

### Package Author

Tutorials for the Carvel `Package Author`.

| Name | Description |
| :-------------------------: | :---------------------------------------------------------------- |
| [The hard way](author/hard) | Learn how the sausage is made building a Carvel package manually. |
| [The easy way](author/easy) | Take the easy way out with the awesome `kctrl` utility. |

### Package Consumer

Tutorials for the Carvel `Package Consumer`.

| Name | Description |
| :---------------------------: | :-------------------------------------- |
| [The easy way](consumer/easy) | The consumer only has the _easy_ way 😄 |
22 changes: 22 additions & 0 deletions content/tutorials/carvel/packages/author/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Package Author"
date: 2024-01-01T00:00:00+00:00
icon: "fa-solid fa-box"
description: "Package Author"
type: "docs"
weight: 3400
draft: false
---

## Overview

In this section you will play the part of the `Package Author` persona.

## Tutorials

A choose your own adventure story.

| Name | Description |
| :------------------: | :------------------------------------------------------- |
| [The hard way](hard) | Learn how the sausage is made building a Carvel package. |
| [The easy way](easy) | Take the easy way out with the awesome `kctrl` utility. |
20 changes: 20 additions & 0 deletions content/tutorials/carvel/packages/author/easy/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "Easy"
date: 2024-01:01T00:00:00+00:00
icon: "fa-solid fa-box"
description: "Create a Carvel package the easy way"
type: "docs"
weight: 3600
draft: false
---

## Overview

This tutorial authors a Carvel package using the `kctrl` CLI which interfaces with the [kapp-controller](https://github.com/carvel-dev/kapp-controller).

**NOTE:** There is also a tutorial in the official documentation [here](https://carvel.dev/kapp-controller/docs/latest/kctrl-package-authoring)

## Steps

1. [Prepare](prepare)
2. [Run kctrl](kctrl)
Loading

0 comments on commit 5f89488

Please sign in to comment.