|
11 | 11 |
|
12 | 12 | This reference guide describes the function and purpose of all the `make` commands found in a {term}`Cookieplone` project. |
13 | 13 | It's organized according to its components. |
14 | | -- Frontend |
15 | | -- Backend |
16 | | -- Documentation |
17 | | -- Environment |
18 | | -- Quality assurance (QA) |
19 | | -- Internationalization (i18n) |
20 | | -- Testing |
21 | | -- Container images |
22 | | -- Local stack |
23 | | -- Acceptance |
| 14 | + |
24 | 15 |
|
25 | 16 | ## Frontend |
26 | 17 |
|
@@ -160,4 +151,66 @@ You can run the following make targets by using the command structure of `make < |
160 | 151 |
|
161 | 152 | `build-images` |
162 | 153 | : Invokes the target `build-image` in both `backend/Makefile` and `frontend/Makefile`. |
163 | | - This builds Docker images for both backend and frontend. |
| 154 | + This builds Docker images for both backend and frontend. |
| 155 | + |
| 156 | + |
| 157 | +## Devops |
| 158 | + |
| 159 | +Cookieplone projects include a `devops` folder when deployment-related questions are answered "Yes" during project generation. |
| 160 | +These questions include the following. |
| 161 | + |
| 162 | +- Add Ansible playbooks? |
| 163 | +- Add GitHub Action to Deploy this project? |
| 164 | + |
| 165 | +When any of these options are selected, Cookieplone generates a {file}`devops/Makefile` file containing deployment and CI/CD helper commands. |
| 166 | + |
| 167 | +You can view the available devops commands in your generated project by running the following help command from the project root. |
| 168 | + |
| 169 | +```shell |
| 170 | +make -C devops help |
| 171 | +``` |
| 172 | + |
| 173 | +Alternatively, change the working directory to {file}`devops` and run its help command. |
| 174 | + |
| 175 | +```shell |
| 176 | +cd devops |
| 177 | +make help |
| 178 | +``` |
| 179 | + |
| 180 | +The available commands align with the selected Cookieplone template options. |
| 181 | + |
| 182 | +When all devops options have been selected, the following output is the result of running the devops help command. |
| 183 | + |
| 184 | +```console |
| 185 | +# === DevOps Makefile Commands === |
| 186 | +deploy Deploy the project using the configured provider |
| 187 | +deploy-check Validate deployment configuration |
| 188 | +deploy-ansible Run Ansible playbooks for provisioning |
| 189 | +deploy-rollback Roll back the last deployment |
| 190 | +deploy-status Show deployment status or active revision |
| 191 | +secrets-edit Edit encrypted secrets |
| 192 | +secrets-view View decrypted secrets |
| 193 | +lint Lint Ansible and DevOps configuration files |
| 194 | +format Format DevOps files (YAML, JSON, etc.) |
| 195 | +clean Clean temporary deployment artifacts |
| 196 | +help Show this help |
| 197 | +``` |
| 198 | + |
| 199 | +These commands support devops tasks, such as: |
| 200 | + |
| 201 | +- provisioning via Ansible |
| 202 | +- deploying through GitHub Actions or GitLab CI |
| 203 | +- editing and viewing encrypted secrets |
| 204 | +- linting devops configuration |
| 205 | +- rolling back deployments |
| 206 | + |
| 207 | + |
| 208 | +## Additional documentation |
| 209 | + |
| 210 | +The {file}`devops` folder also includes {file}`README*.md` files generated by Cookieplone, which contain deployment instructions tailored to your setup: |
| 211 | + |
| 212 | +- {file}`devops/README.md` |
| 213 | +- {file}`devops/README-GHA.md` for GitHub Actions deployment |
| 214 | +- {file}`devops/README-GITLAB.md` for GitLab deployment |
| 215 | + |
| 216 | +These documents provide details, such as provisioning steps, CI configuration, and environment requirements, and are the authoritative source of documentation for devops. |
0 commit comments