Skip to content

Commit

Permalink
Separated Catapult personalization and customization into separate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AllRWeak committed Oct 21, 2024
1 parent 8a87a5c commit 385d672
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 44 deletions.
7 changes: 7 additions & 0 deletions docs/02-how-to-use.md → docs/20-how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ Catapult's commands fall into two categories:
- External commands - All commands that start with `make` are external commands and are used to manage the Catapult container itself.
- Internal commands - All commands that start with `ctp` are internal commands and are used when the user is inside the Catapult container.

Catapult has 2 modes for modifications:

- Personalization - Where users can set their own preferences that will only affect them.
- Customization - Where preferences are configured in a way that they apply to your team/organization etc.

Follow the `# How to Personalization` & `# How to Customize` sections if you want to personalize or customize Catapult.

## Variables

When running catapult for the first time it'll ask you to create a new Ansible Vault file and fill it out with your secrets. The secrets are used to connect to the hypervisors, cloud providers, and other services. Besides the required `deployer_username` & `deployer_password` here are some other variables that you might need when using Catapult with [nova.core](https://github.com/ClarifiedSecurity/nova.core) collection:
Expand Down
35 changes: 35 additions & 0 deletions docs/30-how-to-personalize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# How to Personalization

There several ways to personalize Catapult:

## Personal Docker Compose file

`personal/docker-compose-personal.yml` - This file is used to add to, or override the default configuration values defined in `docker/docker-compose.yml`. It can be used to add custom volumes, environment variables, or other settings that are specific to the user.

Potential use cases for this file include:

- Mounting custom shell rc files (currently only .zshrc supported)
- Adding extra environmental variables to override default Ansible values that come from `ansible.cfg`
- Mounting custom files into the container

## Personal aliases file

`personal/.personal_aliases` - This file is used to add custom shell aliases features etc.

Potential use cases for this file include:

- Adding custom aliases that are not available in the defaults
- Adding aliases that are specific to the user
- Adding specific functions that are not available in the defaults

## Personal makefile configuration

`personal/.makerc-personal` - This file is used to add custom makefile variables that are specific to the user. Refer to the `.makerc-vars` file for available options.

Potential use cases for this file include:

- Adding custom make commands that are specific to the user

## Personal CLI commands

`personal/autocomplete.yml` - This file is used to add custom autocomplete commands for `ctp` that are specific to the user. Refer to the default [autocomplete.yml](https://github.com/ClarifiedSecurity/catapult/blob/main/defaults/autocomplete.yml) as an example
43 changes: 0 additions & 43 deletions docs/03-how-to-customize.md → docs/40-how-to-customize.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,5 @@
# How to customize

Catapult has 2 modes of customization:

- Personalization - Where users can set their own preferences that will only affect them.
- Customization - Where preferences are configured in a way that they apply to your team/organization etc.

## Personalization

There several ways to personalize Catapult:

### Personal Docker Compose file

`personal/docker-compose-personal.yml` - This file is used to add to, or override the default configuration values defined in `docker/docker-compose.yml`. It can be used to add custom volumes, environment variables, or other settings that are specific to the user.

Potential use cases for this file include:

- Mounting custom shell rc files (currently only .zshrc supported)
- Adding extra environmental variables to override default Ansible values that come from `ansible.cfg`
- Mounting custom files into the container

### Personal aliases file

`personal/.personal_aliases` - This file is used to add custom shell aliases features etc.

Potential use cases for this file include:

- Adding custom aliases that are not available in the defaults
- Adding aliases that are specific to the user
- Adding specific functions that are not available in the defaults

### Personal makefile configuration

`personal/.makerc-personal` - This file is used to add custom makefile variables that are specific to the user. Refer to the `.makerc-vars` file for available options.

Potential use cases for this file include:

- Adding custom make commands that are specific to the user

## Personal CLI commands

`personal/autocomplete.yml` - This file is used to add custom autocomplete commands for `ctp` that are specific to the user. Refer to the default [autocomplete.yml](https://github.com/ClarifiedSecurity/catapult/blob/main/defaults/autocomplete.yml) as an example

## Customization

To customize Catapult for your team or organization, a separate git project needs to be created that contains all of the required files. Then users need to be pointed that project using the `MAKEVAR_CATAPULT_CUSTOMIZER_REPO` variable in their `personal/.makerc-personal` file. Use the [Catapult Customizer](https://github.com/ClarifiedSecurity/catapult-customizer) repo as an example.

The structure of the customization repo is as follows:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion version.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 5.8.21
version: 5.8.23

0 comments on commit 385d672

Please sign in to comment.