This is a Hugo site. It is driven by markdown files that can be generated using the commands provided in this document.
- Make it customer agnostic. No customer or customer project names in the recipes. Do not name recipe files with customer or customer project names.
- Start from this repository https://github.com/pivotalservices/modernization-cookbook-template
- Prefer
markdown
overasciidoc
. Definitely don't write recipes in doc or docx. - Use TOML instead of
JSON
orYAML
in the frontmatter. - Categorize your recipe from one of the following by adding one of the categories in the taxonomy below this in the front-matter markup like
taxonomy = ["API-FIRST"]
- Put all markdown files in the
content/recipes
andcontent/documents
- Put good camel case title in
title=xxx
front matter to be automatically picked up by landing pages - Add
taxonomy=["CLIENT"]
to exclude the rendering of the recipe/doc or addreview_status = ["DONE"]
to get it published externally. - If in doubt look at the recipes in this template repo.
- REPLATFORMING fa-cloud-upload "Best practices and tips for replatforming applications"
- JavaEE "Patterns and techniques for porting JavaEE and J2EE component frameworks to Spring"
- SPRING "Spring specific tips and code snippets"
- MODERNIZATION "Tips and tricks to move your application the cloud nativity scale. Recipes on DDD and Event Storming."
- CODE-ORGANIZATION "One codebase tracked in revision control, many deploys. Explicitly declare and isolate dependencies. Best practices around code hygiene and general Java development idioms."
- API-FIRST "API first design and recipes that are all about API, Consumer driven API - Swagger, API gateways, OpenAPI spec."
- TEST-DRIVEN-DEVELOPMENT "Test Driven Development. Unit, Integration and other testing recipes."
- DESIGN-BUILD-RELEASE-RUN "Strictly separate build and run stages. Continous Integration, Pipeline and release management best practices."
- CONFIG-CREDENTIALS-CODE "Store Configuration and Credentials in the environment. Injection of credentials and configuration into the application environment."
- LOGS "Treat logs as event streams"
- BACKING-SERVICES-PORT-BINDING "Treat backing services as attached resources.Export services via port binding. Connecting and consuming all the backing data and messaging stores is covered here."
- ADMIN-PROCESSES "Run admin/management tasks as one-off processes. Batch processing."
- STATELESS-CONCURRENCY "Execute the app as one or more stateless processes. Scale out via the process model"
- TELEMETRY "APM, Metrics and Monitoring."
- AUTHn-AUTHz "Security related topics."
- TROUBLESHOOTING "Debugging and Troubleshooting of apps and modules during staging and running of apps"
- DAY2-OPS "Operating an app in production."
- GENERAL "General uncategorized recipes"
- IDE-HACKS "IDE (IntelliJ, Eclipse) specific short cuts/ tricks"
- PKS "Recipes to do with PKS, Lift & Shift and AppTx".
- CLIENT "Internal Only - Client specific recipes"
- PATTERN Buckets of Recipes
- Install
hugo
- With homebrew (Mac):
brew update && brew install hugo
- Manual download and install: https://github.com/gohugoio/hugo/releases
- With homebrew (Mac):
The following steps will walk you through the process of creating a new GitHub repository with the modernization template and wipe out all the commit history associated to the modernization template so you can start fresh in your new cookbook repository.
-
Create a new private GitHub repository in
pivotalservices
with the name of the customer with cookbook suffix ex.customer-cookbook
-
Download the
new-cookbook
script from here -
Run the script providing name of the customer cookbook and path to the cookbook repository
new-cookbook customer-cookbook https://github.com/pivotalservices/customer-cookbook.git
-
Update the README and clean up existing content as needed
-
Add the new cookbook repository to
app[0]
team on the Github so that it is picked up by the cookbook aggregation tool
./localserver
./publish
cf push
hugo new recipes/(title).md
This site uses the hugo-theme-docdock
theme, which is stored as a git submodule
under the themes
directory.
To pull the latest version of the theme, update your submodules: git submodule update --remote
and commit the change to customer cookbook repo.
To disable the homepage and remove icon from sidebar, set the noHomeIcon
param in /config.toml
:
[params]
noHomeIcon = false
To redirect to the /recipes
route by default, uncomment the following in /layouts/partials/index.html
:
<meta http-equiv="refresh" content="0; url=/recipes" />