You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this CDK project, a entry-point file is **infra/app-main.ts** which is described in `cdk.json`.
78
+
In this CDK project, a entry-point file is **infra/app-main.ts** which is described in `cdk.json`.
79
79
80
-
### **Set up deploy config**
80
+
### **Set up deploy configuration**
81
81
82
-
The `config/app-config-demo.json` file describes how to configure deploy condition & stack condition. First of all, change project configurations(Account, Profile are essential) in ```config/app-config-demo.json```.
82
+
This project is based on [aws-cdk-project-template-for-devops](https://github.com/aws-samples/aws-cdk-project-template-for-devops), which adopts configuration driven development(CDD). So let's set up configuration file(`config/app-config-demo.json`), which describes deployment target information(account/region) and how to configure each stack properties.
83
+
84
+
First of all, change deployment target information(account/region) in ```config/app-config-demo.json``` according to your AWS accout environment.
83
85
84
86
```json
85
87
{
86
88
"Project": {
87
-
"Name": "MLOpsPipeline", <----- Optional: your project name, all stacks wil be prefixed with [Project.Name+Project.Stage]
88
-
"Stage": "Demo", <----- Optional: your project stage, all stacks wil be prefixed with [Project.Name+Project.Stage]
89
-
"Account": "75157*******", <----- Essential: update according to your AWS Account
90
-
"Region": "us-east-2", <----- Essential: update according to your target resion
91
-
"Profile": "cdk-demo"<----- Essential: AWS Profile, keep empty string if no profile configured
89
+
"Name": "MLOpsPipeline", <----- your project name, all stacks wil be prefixed with [Project.Name+Project.Stage]
90
+
"Stage": "Demo", <----- your project stage, all stacks wil be prefixed with [Project.Name+Project.Stage]
91
+
"Account": "75157*******", <----- update according to your AWS Account
92
+
"Region": "us-east-2", <----- update according to your target resion
93
+
"Profile": "cdk-demo"<----- AWS Profile, keep empty string if no profile configured
92
94
},
93
95
...
94
96
...
95
97
}
96
98
```
97
99
98
-
And then set the path of this json configuration file through an environment variable.
100
+
And then set the path of this json configuration file through setting up environment variable.
99
101
100
102
```bash
101
103
export APP_CONFIG=config/app-config-demo.json
102
104
```
103
105
104
-
Through this external configuration injection, multiple deployments(multiple account, multiple region, multiple stage) are possible without code modification.
106
+
Through this external configuration injection, multiple deployments(multiple account, multiple region, multiple stage) are possible without code modification. For example, we can maintain a variety of configuration files such as `app-config-dev.json`, `app-config-test.json` and `app-config-prod.json` at the same time.
105
107
106
108
### **Install dependecies & Bootstrap**
107
109
108
-
For more details, open `script/setup_initial.sh` file.
110
+
Execute the following command, which will check versions and install dependencies intead of us. For more details, open `script/setup_initial.sh` file.
109
111
110
112
```bash
111
113
sh script/setup_initial.sh config/app-config-demo.json
@@ -157,13 +159,13 @@ Many resources such as Lambda/SageMakerTrainingJob/GlueETLJob have been deployed
157
159
158
160
### **Prepare a input data**
159
161
160
-
Download sample data by running the following command:
162
+
Download sample data by running the following command, where `sed` command is used to remove `"` character in each line.
161
163
162
164
```bash
163
165
sh codes/glue/churn-xgboost/script/download_data.sh
164
166
```
165
167
166
-
A sample data will be downloaded in `codes/glue/churn-xgboost/data/input.csv`, and double quotes in this file will be removded to format `csv`.
168
+
A sample data will be downloaded in `codes/glue/churn-xgboost/data/input.csv`.
167
169
168
170
### **Trigger the StateMachine in Step Functions**
169
171
@@ -233,7 +235,7 @@ Amazon SageMaker Training Job Result in AWS S3 Bucket
233
235
234
236
### **How to invoke SageMaker-Endpoint**
235
237
236
-
Finally, let's inovoke`SageMaker Endpoint` to make sure it works well.
238
+
Finally, let's invoke`SageMaker Endpoint` to make sure it works well.
237
239
238
240
Before invocation, open `codes/glue/churn-xgboost/script/test_invoke.py` file, and update `profile name` and `endpoint name` according to your configuration.
0 commit comments