|
3 | 3 | [](https://dev.azure.com/epicstuff/bedrock/_build/latest?definitionId=128&branchName=master) |
4 | 4 |  |
5 | 5 |
|
6 | | -`spk` is a tool that provides automation around defining and operating |
7 | | -Kubernetes clusters with [Bedrock](https://github.com/microsoft/bedrock) |
8 | | -principles. |
| 6 | +`spk` helps you automate, manage, and observe Kubernetes deployment operations |
| 7 | +based on [Bedrock](http://aka.ms/bedrock) patterns and principles. |
9 | 8 |
|
10 | | -The three core areas of `spk` are: |
| 9 | +Key features: |
11 | 10 |
|
12 | | -- [Service Introspection](./guides/service-introspection.md) |
13 | | -- [Service Management](./guides/service-management.md) |
14 | | -- [Cloud Infra Management](./guides/cloud-infra-management.md) |
| 11 | +1. Builds event triggered GitOps pipelines |
| 12 | + ([learn more](./guides/project-service-management-guide.md)) |
| 13 | +2. Provides tabular introspection of applications from Docker image build to |
| 14 | + multi-cluster deployment |
| 15 | + ([learn more](./guides/service-introspection-onboarding.md)) |
| 16 | +3. Streamlines management of versioned Terraform environments |
| 17 | + ([learn more](./guides/infra/README.md#guides)) |
15 | 18 |
|
16 | 19 |  |
17 | 20 |
|
18 | | -For more information on the end-to-end experience of using Bedrock principles |
19 | | -refer to: |
20 | | -[Bedrock Developer and Operations Experience](https://github.com/CatalystCode/bedrock-end-to-end-dx) |
| 21 | +## Install |
21 | 22 |
|
22 | | -## Guides |
23 | | - |
24 | | -You will find several guides to help you get started on each of the areas at |
25 | | -[SPK guides](./guides/README.md). |
26 | | - |
27 | | -## Installation |
28 | | - |
29 | | -Please refer to the latest SPK |
30 | | -[release](https://github.com/CatalystCode/spk/releases) and navigate to the |
31 | | -_assets_ section. From there choose from one of the following platform options |
32 | | -to download: |
33 | | - |
34 | | -- linux |
35 | | -- macos |
36 | | -- windows |
| 23 | +Download pre-compiled binaries of SPK on the |
| 24 | +[release](https://github.com/CatalystCode/spk/releases) page. |
37 | 25 |
|
38 | 26 | ## CLI |
39 | 27 |
|
40 | | -``` |
| 28 | +```shell |
| 29 | +$ spk |
41 | 30 | Usage: spk [options] [command] |
42 | 31 |
|
43 | 32 | The missing Bedrock CLI |
44 | 33 |
|
45 | 34 | Options: |
46 | | - -v, --verbose Enable verbose logging |
47 | | - -V, --version output the version number |
48 | | - -h, --help output usage information |
| 35 | + -v, --verbose Enable verbose logging |
| 36 | + -V, --version output the version number |
| 37 | + -h, --help output usage information |
49 | 38 |
|
50 | 39 | Commands: |
51 | | - init|i [options] Initialize the spk tool for the first time. |
52 | | - deployment Introspect your deployments |
53 | | - project Initialize and manage your Bedrock project. |
54 | | - service Create and manage services for a Bedrock project. |
55 | | - infra Manage and modify your Bedrock infrastructure. |
56 | | - hld Commands for initalizing and managing a bedrock HLD repository. |
57 | | - variable-group Creates Variable Group in Azure DevOps project. |
| 40 | + init|i [options] Initialize the spk tool for the first time. |
| 41 | + setup|s [options] An interactive command to setup resources in azure and azure dev-ops |
| 42 | + deployment Introspect your deployments |
| 43 | + hld Commands for initalizing and managing a bedrock HLD repository. |
| 44 | + infra Manage and modify your Bedrock infrastructure. |
| 45 | + project Initialize and manage your Bedrock project. |
| 46 | + service Create and manage services for a Bedrock project. |
| 47 | + variable-group Creates Variable Group in Azure DevOps project. |
58 | 48 | ``` |
59 | 49 |
|
60 | | -## `spk` commands docs |
61 | | - |
62 | | -- [spk deployment](./guides/service-introspection.md) |
63 | | -- [spk hld](./guides/hld-management.md) |
64 | | -- [spk infra](./guides/cloud-infra-management.md) |
65 | | -- [spk init](https://catalystcode.github.io/spk/commands/index.html#init) |
66 | | -- [spk project](./guides/project-management.md) |
67 | | -- [spk service](./guides/service-management.md) |
68 | | -- [spk variable-group](./guides/variable-group.md) |
69 | | - |
70 | 50 | ## Getting Started |
71 | 51 |
|
72 | | -To utilize `spk` as your bedrock project and service management tool, follow the |
73 | | -[Managing a bedrock project with spk guide](./guides/project-service-management-guide.md). |
74 | | - |
75 | | -Otherwise, generally: |
76 | | - |
77 | | -To start using `spk` you'll need to: |
78 | | - |
79 | | -1. Configure `spk` in `spk-config.yaml`. Refer to [this](./spk-config.yaml) |
80 | | - template to get started. |
81 | | -2. Run `spk init -f spk-config.yaml` |
82 | | - |
83 | | -### spk-config.yaml |
84 | | - |
85 | | -The [`spk-config.yaml`](./spk-config.yaml) consists of three main sections: |
86 | | - |
87 | | -1. `introspection` |
88 | | -2. `infra` |
89 | | -3. `azure_devops` |
| 52 | +The fastest way to get started with `spk` is to following our interactive |
| 53 | +initialization. |
90 | 54 |
|
91 | | -#### Environment Variables |
92 | | - |
93 | | -To specify private keys or access tokens that should **not be stored in raw |
94 | | -text** in the `spk-config.yaml` file, set the values in environment variables. |
95 | | - |
96 | | -For example: |
97 | | - |
98 | | -``` |
99 | | -account_name: "someHardcodedValue" |
100 | | -table_name: "anotherNonPrivateKey" |
101 | | -key: "${env:ACCESS_KEY}" |
102 | | -partition_key: "canBeStoredInRawTextKey" |
| 55 | +```bash |
| 56 | +spk init -i |
103 | 57 | ``` |
104 | 58 |
|
105 | | -In this case, the value for `key` is taken from the environment variable |
106 | | -`ACCESS_KEY`. |
107 | | - |
108 | | -#### Creating environment variables |
109 | | - |
110 | | -There are two options to create environment variables: |
111 | | - |
112 | | -1. In a `.env` file |
113 | | -2. In your shell |
114 | | - |
115 | | -##### Option 1: .env File |
116 | | - |
117 | | -A recommended approach is to have a `.env` file in your folder **(make sure it's |
118 | | -gitignored!)** with all variables and their values. |
119 | | - |
120 | | -[Sample `.env`](./.env.example): |
| 59 | +This will guide you through the process of creating a configuration. |
| 60 | +Alternatively if you already have a [configuration file](./guide/config-file.md) |
| 61 | +you can run the command: |
121 | 62 |
|
122 | | -``` |
123 | | -INTROSPECTION_STORAGE_ACCESS_KEY="access key" |
124 | | -AZURE_TENANT_ID="AAD tenant id" |
125 | | -AZURE_CLIENT_ID="Azure service principal client Id" |
126 | | -AZURE_CLIENT_SECRET="Azure service principal client secret/password" |
127 | | -AZURE_SUBSCRIPTION_ID="Azure subscription id" |
| 63 | +```bash |
| 64 | +spk init -f spk-config.yaml |
128 | 65 | ``` |
129 | 66 |
|
130 | | -##### Option 2: shell |
| 67 | +## Guides |
131 | 68 |
|
132 | | -To create an environment variable, run the `export` command. |
| 69 | +You will find several guides to help you get started on each of the areas at |
| 70 | +[SPK guides](./guides/README.md). |
133 | 71 |
|
134 | | -The following example creates the `ACCESS_KEY` environment variable. |
| 72 | +- [Managing a bedrock project with SPK](./guides/project-service-management-guide.md) |
| 73 | +- [Observing deployments with SPK](./guides/service-introspection-onboarding.md) |
| 74 | +- [Simplifying multiple Terraform environments with SPK](./guides/infra/README.md#guides) |
135 | 75 |
|
136 | | -``` |
137 | | -export ACCESS_KEY="33DKHF933JID" |
138 | | -``` |
| 76 | +## CLI Command Reference |
139 | 77 |
|
140 | | -**Note:** Opening a new shell window erases the previously defined environment |
141 | | -variables. Run the `export` command again to create them or use an `.env` file |
142 | | -to define them instead. |
| 78 | +> https://catalystcode.github.io/spk/commands/ |
143 | 79 |
|
144 | 80 | ## Contributing |
145 | 81 |
|
|
0 commit comments