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
* Update readme and include an example to run a converted nitro app
* Update shiplift crate - virtual_size optional field of docker image attributes
* Fix SALM-559 - error while building the tests-container due to changes in the dnsmaq.conf file
* Review changes
---------
Co-authored-by: aditijannu <[email protected]>
4. Build requisite docker images needed to run container converter
47
+
3. Build requisite docker images needed to run container converter
39
48
```bash
40
49
# Run from the root of the repository
41
50
# build enclave-base image
42
51
cd salmiac/docker/enclave-base
43
52
docker build -t enclave-base .
44
53
45
54
# build parent-base image
46
-
cd ..//parent-base
55
+
cd ../parent-base
47
56
docker build -t parent-base .
48
57
```
49
58
50
-
5. Compile container converter:
59
+
4. Build the enclave kernel. This step takes a long time and needs to be done only once. The artifacts produced by this step need not be cleaned up unless the kernel config is updated.
60
+
```bash
61
+
cd amzn-linux-nbd
62
+
./build-enclave-kernel.sh build
63
+
```
64
+
65
+
5. Build the converter image. To produce a debug build of the converter, ensure the release flag is removed from the step below.
51
66
```bash
52
67
# Run from the root of the repository
53
68
cd salmiac
54
-
./build-converter.sh
69
+
# To produce a debug build of the converter, ensure the release flag is removed from the step below.
70
+
./build-converter.sh --release
71
+
72
+
cd docker
73
+
# If a debug build of the converter was produced, use debug as an argument to the below script
74
+
./build-conv-container.sh release
55
75
```
56
76
57
-
6. Create a simple conversion request json file
77
+
6. Create a simple conversion request json file (say /tmp/req.json)
78
+
More details about each field of the conversion request can be found in /salmiac/api-model/src/converter.rs
58
79
```javascript
59
80
{
60
81
"input_image": {
61
-
"name": "<your application image tag>",
82
+
"name": "hello-world",
62
83
},
63
84
"output_image": {
64
-
"name": "<your output image tag>",
85
+
"name": "hello-world-nitro",
65
86
},
66
87
"converter_options": {
67
-
"debug": true
88
+
"push_converted_image": false,
89
+
"enable_overlay_filesystem_persistence": false
68
90
},
69
91
"nitro_enclaves_options": {
70
92
"cpu_count": 2,
@@ -73,19 +95,19 @@ Quick Start Guide
73
95
}
74
96
```
75
97
76
-
7. Make your application Nitro VM-capable by running container converter with the file from previous step
98
+
7. Make your application Nitro VM-capable by running container converter with the file from previous step.
99
+
The converter by default pulls the input image and pushes the output image to remote repositories. These images are then cleaned up from the local docker cache. In our example, the output image push is disabled in the request json and to preserve the images in the docker cache, 'PRESERVE_IMAGES' environment variable is specified.
77
100
```bash
78
-
# Run from the root of the repository
79
-
cd tools/container-converter/target/debug
80
-
./container-converter --request-file <path to file from step 4>
8. Copy converted image into your EC2 instance and run the image
104
+
8. Copy converted image into your EC2 instance and run the image.
105
+
Note the use of the environment variable which disables the use of default certificates, which allows you to skip access to Fortanix CCM. Read more about environment variables used in salmiac here - /salmiac/ENV_VARS.md
84
106
```bash
85
107
# Copy your converted image from step #7 into your EC2 isntance
86
108
# ...
87
109
# Run copied image inside EC2
88
-
docker run -it --rm --privileged -v /run/nitro_enclaves:/run/nitro_enclaves <your image name>
110
+
docker run -it --rm --privileged -v /run/nitro_enclaves:/run/nitro_enclaves -e ENCLAVEOS_DISABLE_DEFAULT_CERTIFICATE=true hello-world-nitro
89
111
```
90
112
91
113
# Contributing
@@ -122,4 +144,4 @@ this project or the open source license(s) involved.
122
144
123
145
# License
124
146
125
-
This project is primarily distributed under the terms of the Mozilla Public License (MPL) 2.0, see [LICENSE](./LICENSE) for details.
147
+
This project is primarily distributed under the terms of the Mozilla Public License (MPL) 2.0, see [LICENSE](./LICENSE) for details.
0 commit comments