-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update formatting of cdk docs (#218)
* update formatting of cdk docs * add missing period
- Loading branch information
Showing
7 changed files
with
184 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
################# | ||
Advanced Features | ||
################# | ||
|
||
Advanced features and detailed information for using CDK with Runway. | ||
|
||
|
||
*********** | ||
Build Steps | ||
*********** | ||
|
||
Build steps (e.g. for compiling TypeScript) can be specified in the module options. | ||
These steps will be run before each diff, deploy, or destroy. | ||
|
||
.. rubric:: Example | ||
.. code-block:: yaml | ||
--- | ||
deployments: | ||
- modules: | ||
- path: mycdkmodule.cdk | ||
environments: | ||
dev: true | ||
options: | ||
build_steps: | ||
- npx tsc | ||
**************** | ||
Disabling NPM CI | ||
**************** | ||
|
||
At the start of each module execution, Runway will execute ``npm ci`` to ensure | ||
the CDK is installed in the project (so Runway can execute it via | ||
``npx cdk``. This can be disabled (e.g. for use when the ``node_modules`` | ||
directory is pre-compiled) via the ``skip_npm_ci`` module option: | ||
|
||
.. rubric:: Example | ||
.. code-block:: yaml | ||
--- | ||
deployments: | ||
- modules: | ||
- path: mycdkmodule.cdk | ||
options: | ||
skip_npm_ci: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
############# | ||
Configuration | ||
############# | ||
|
||
Standard `CDK <https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html>`__ rules apply but, we have some added prerequisites, recommendations, and caveats. | ||
|
||
|
||
************* | ||
Prerequisites | ||
************* | ||
|
||
- `npm installed on the system <https://www.npmjs.com/get-npm>`__ | ||
- CDK must be a dev dependency of the module (e.g. ``npm install --save-dev aws-cdk``) | ||
|
||
We strongly recommend you commit the package-lock.json that is generated after running ``npm install``. | ||
|
||
|
||
************ | ||
Environments | ||
************ | ||
|
||
Unlike some other module types, CDK does not have file that can be used to configure an environment. | ||
It can only be configured using the ``environments`` option of a deployment and/or module (see :ref:`Runway Config File <runway-config>` for details). | ||
|
||
|
||
Runway Config | ||
============= | ||
|
||
.. rubric:: Top-level | ||
.. code-block:: yaml | ||
--- | ||
deployments: | ||
- modules: | ||
- path: mycdkmodule.cdl | ||
environments: | ||
dev: true | ||
prod: true | ||
- modules: | ||
- path: myothercdkmodule.cdk | ||
environments: | ||
dev: true | ||
prod: true | ||
.. rubric:: In Module Directory | ||
.. code-block:: yaml | ||
--- | ||
environments: | ||
dev: true | ||
prod: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
################### | ||
Directory Structure | ||
################### | ||
|
||
Example directory structures for a CDK module. | ||
|
||
|
||
********** | ||
C# Example | ||
********** | ||
|
||
.. code-block:: | ||
. | ||
├── add-project.hook.d.ts | ||
├── cdk.json | ||
├── package.json | ||
├── package-lock.json | ||
└── src | ||
├── HelloCdk | ||
│ ├── HelloCdk.csproj | ||
│ ├── HelloConstruct.cs | ||
│ ├── HelloStack.cs | ||
│ └── Program.cs | ||
└── HelloCdk.sln | ||
************** | ||
Python Example | ||
************** | ||
|
||
.. code-block:: | ||
. | ||
├── Pipfile | ||
├── Pipfile.lock | ||
├── app.py | ||
├── cdk.json | ||
├── hello | ||
│ ├── __init__.py | ||
│ ├── hello_construct.py | ||
│ └── hello_stack.py | ||
├── package.json | ||
└── package-lock.json | ||
****************** | ||
TypeScript Example | ||
****************** | ||
|
||
.. code-block:: | ||
. | ||
├── bin | ||
│ └── sample.ts | ||
├── cdk.json | ||
├── lib | ||
│ └── sample-stack.ts | ||
├── package.json | ||
├── package.json | ||
└── tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ Module Configurations | |
:maxdepth: 1 | ||
:name: mod-configs | ||
|
||
cdk | ||
custom | ||
kubernetes | ||
serverless | ||
|