diff --git a/.wordlist.txt b/.wordlist.txt index e277f94bc..8a5e63554 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -2907,4 +2907,64 @@ untar xnn xnnpack xzf -MacBook \ No newline at end of file +MacBook +AdaBoost +AndroidManifest +AppCompatActivity +CNNs +Caffe +CameraBridgeViewBase +CascadeClassifier +CheckBox +CvCameraViewListener +CvType +DNN +FaceDetection +Haar +IOException +ImageView +Imgproc +JavaCameraView +MatOfRect +Multibox +OpenCV's +OpenCVLoader +OpenCV’s +RGBA +TextView’s +UC +YOLO +buttonStartPreview +buttonStopPreview +cameraPermissionRequestCode +checkBoxProcessing +detectMultiScale +enableEdgeToEdge +enableView +faceCascade +facedetection +filesDir +findViewById +frontalface +getPath +grayFrame +grayscale +haarcascade +initLocal +isOpenCvInitialized +isPreviewActive +loadHaarCascade +onCameraFrame +onCameraViewStarted +onCameraViewStopped +onClickListeners +onCreate +openCV +openCvCameraView +opencvcamera +opencvfacedetection +setCameraPermissionGranted +setContentView +textViewStatus +thresholding +updateControls \ No newline at end of file diff --git a/content/install-guides/aws-greengrass-v2.md b/content/install-guides/aws-greengrass-v2.md index bcea68e5b..5b779ab07 100644 --- a/content/install-guides/aws-greengrass-v2.md +++ b/content/install-guides/aws-greengrass-v2.md @@ -3,8 +3,8 @@ title: AWS IoT Greengrass author_primary: Michael Hall additional_search_terms: - iot -- cloud -- deploy +- AWS +- Greengrass layout: installtoolsall minutes_to_complete: 15 diff --git a/content/install-guides/mdk.md b/content/install-guides/mdk.md index de82330e3..e874f01cd 100644 --- a/content/install-guides/mdk.md +++ b/content/install-guides/mdk.md @@ -28,7 +28,7 @@ multi_install: false # Set to true if first page of multi-page articl multitool_install_part: false # Set to true if a sub-page of a multi-page article, else false layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles --- -[Arm Keil MDK](https://developer.arm.com/Tools%20and%20Software/Keil%20MDK) is the complete software development environment for a range of Arm Cortex-M based microcontroller devices. MDK includes the µVision IDE and debugger, Arm C/C++ compiler, and essential middleware components. It supports more than 9,500 devices and is easy to learn and use. +[Arm Keil MDK](https://developer.arm.com/Tools%20and%20Software/Keil%20MDK) is the complete software development environment for a range of Arm Cortex-M based microcontroller devices. MDK includes the µVision IDE and debugger, Arm C/C++ compiler, and essential middleware components. It supports more than 10,000 devices and is easy to learn and use. ## Before you begin diff --git a/content/install-guides/openvscode-server.md b/content/install-guides/openvscode-server.md index 7d130777c..16633e8e8 100644 --- a/content/install-guides/openvscode-server.md +++ b/content/install-guides/openvscode-server.md @@ -55,7 +55,7 @@ Download a release of OpenVSCode Server from the [GitHub release area](https://g For example, use `wget` to download. ```bash -wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.79.2/openvscode-server-v1.79.2-linux-arm64.tar.gz +wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.90.0/openvscode-server-v1.90.0-linux-arm64.tar.gz ``` ## Install @@ -63,7 +63,7 @@ wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode Install the download by extracting the file ```bash -tar xvfz openvscode-server-v1.79.2-linux-arm64.tar.gz +tar xvfz openvscode-server-v1.90.0-linux-arm64.tar.gz ``` ## Start OpenVSCode Server @@ -71,7 +71,7 @@ tar xvfz openvscode-server-v1.79.2-linux-arm64.tar.gz To start OpenVSCode Server run: ```bash -./openvscode-server-v1.79.2-linux-arm64/bin/openvscode-server +./openvscode-server-v1.90.0-linux-arm64/bin/openvscode-server ``` The server will print a URL to access VS Code in a browser. The URL is localhost URL. If your machine is a remote system or a Linux subsystem there are two options to connect using your local browser. @@ -114,7 +114,7 @@ On ChromeOS you can use the Linux configuration settings to automatically do por There are command line options to change the port, the token, and other configuration options. To see the options run: ```bash -./openvscode-server-v1.79.2-linux-arm64/bin/openvscode-server --help +./openvscode-server-v1.90.0-linux-arm64/bin/openvscode-server --help ``` If you are running all on a local machine the token can be eliminated using the `--without-connection-token` option. diff --git a/content/install-guides/porting-advisor.md b/content/install-guides/porting-advisor.md index 49846d7cd..ef5a6894b 100644 --- a/content/install-guides/porting-advisor.md +++ b/content/install-guides/porting-advisor.md @@ -126,6 +126,7 @@ Enter the Python virtual environment and install the required packages: ```bash source .venv/bin/activate pip install -r requirements.txt +pip install pyinstaller certifi ``` Confirm Porting Advisor runs as a script: @@ -183,15 +184,20 @@ The Porting Advisor includes some small examples in the `sample-projects` direct Run Porting Advisor on a Go sample with the executable: ```bash -./dist/porting-advisor-linux-aarch64 sample-projects/go-samples/incompatible +./dist/porting-advisor-linux-aarch64 sample-projects/java-samples/ ``` The recommendations for this application will be printed along with links on where to get more details. ```output +Porting Advisor for Graviton v1.1.1 +Report date: 2024-06-25 08:47:06 + 2 files scanned. -detected go code. min version 1.16 is required. version 1.18 or above is recommended. we detected that you have version 1.15. see https://github.com/aws/aws-graviton-getting-started/blob/main/golang.md for more details. -sample-projects/go-samples/incompatible/go.mod: using dependency library github.com/golang/snappy version 0.0.1. upgrade to at least version 0.0.2 +detected java code. we recommend using Corretto. see https://aws.amazon.com/corretto/ for more details. +detected java code. min version 8 is required. version 11 or above is recommended. see https://github.com/aws/aws-graviton-getting-started/blob/main/java.md for more details. + +Report generated successfully. Hint: you can use --output FILENAME.html to generate an HTML report. ``` Try out the other sample projects. diff --git a/content/install-guides/vscode-tunnels.md b/content/install-guides/vscode-tunnels.md index 24e2a2fd6..586209385 100644 --- a/content/install-guides/vscode-tunnels.md +++ b/content/install-guides/vscode-tunnels.md @@ -6,13 +6,11 @@ title: VS Code Tunnels ### Optional additional search terms (one per line) to assist in finding the article additional_search_terms: - ide -- vs - vscode -- visual studio ### Estimated completion time in minutes (please use integer multiple of 5) -minutes_to_complete: 15 +minutes_to_complete: 10 author_primary: Jason Andrews diff --git a/content/learning-paths/cross-platform/docker-build-cloud/_index.md b/content/learning-paths/cross-platform/docker-build-cloud/_index.md index 82658c88b..2193d6a37 100644 --- a/content/learning-paths/cross-platform/docker-build-cloud/_index.md +++ b/content/learning-paths/cross-platform/docker-build-cloud/_index.md @@ -1,8 +1,6 @@ --- title: Build multi-architecture container images with Docker Build Cloud -draft: false - minutes_to_complete: 30 who_is_this_for: This is an introductory topic for software developers who want to learn how to use Docker Build Cloud. diff --git a/content/learning-paths/cross-platform/github-arm-runners/_index.md b/content/learning-paths/cross-platform/github-arm-runners/_index.md index 13829038f..446ab955c 100644 --- a/content/learning-paths/cross-platform/github-arm-runners/_index.md +++ b/content/learning-paths/cross-platform/github-arm-runners/_index.md @@ -1,8 +1,6 @@ --- title: Build multi-architecture container images with GitHub Arm-hosted runners -draft: false - minutes_to_complete: 30 who_is_this_for: This is an introductory topic for software developers who want to learn how to use Arm-hosted runners for GitHub Actions jobs. diff --git a/content/learning-paths/cross-platform/ipexplorer/_index.md b/content/learning-paths/cross-platform/ipexplorer/_index.md index 14b00cf4f..98f66ec04 100644 --- a/content/learning-paths/cross-platform/ipexplorer/_index.md +++ b/content/learning-paths/cross-platform/ipexplorer/_index.md @@ -1,6 +1,5 @@ --- title: Custom software for simulation with IP Explorer -draft: false minutes_to_complete: 60 who_is_this_for: This is an introductory topic for IP Explorer users using the software simulation platforms available. diff --git a/content/learning-paths/cross-platform/matrix/1-foundations.md b/content/learning-paths/cross-platform/matrix/1-foundations.md index 3bf1f3ec8..ad5681b8b 100644 --- a/content/learning-paths/cross-platform/matrix/1-foundations.md +++ b/content/learning-paths/cross-platform/matrix/1-foundations.md @@ -6,7 +6,7 @@ weight: 2 layout: learningpathall --- -In this section you will setup the structure for the Matrix processing library. +In this section you will setup the structure for the Matrix processing library. At the end, you will be able to build the library and an application that uses the library on all supported platforms: macOS, Linux, and Windows. @@ -20,30 +20,42 @@ You will need the following tools, make sure they are available on your developm - A build system: [GNU Make](https://www.gnu.org/software/make/) or [Ninja](https://ninja-build.org/) - A documentation generator: [Doxygen](https://www.doxygen.nl/) -- An IDE ([Visual Studio Code](https://code.visualstudio.com/) is a popular - choice) or a text editor ([Vim](https://www.vim.org/), [GNU - Emacs](https://www.gnu.org/software/emacs/), [Sublime - Text](https://www.sublimetext.com/) are popular choices). + +On a Ubuntu machine, they can be installed with: + +```BASH +sudo apt-get install build-essential clang ninja-build cmake doxygen -y +``` + +On top of those tools, you will also need an IDE (Integrated Development +Environment). [Visual Studio Code](https://code.visualstudio.com/) is a popular +choice, and you can install it by following the +[instructions](https://code.visualstudio.com/docs/setup/linux). Alternatively, +you can use a text editor like [Vim](https://www.vim.org/), [GNU +Emacs](https://www.gnu.org/software/emacs/) or [Sublime +Text](https://www.sublimetext.com/) which are also popular choices and all +support extensions that make C++ development easy. + ## About configuring vs. building When developing software, two separate but linked aspects must be -considered: -- How to configure the project +considered: +- How to configure the project - How to build the source code The first aspect is about configuring the project, which covers: - The platform itself (Windows, macOS, Linux): each platform has specific requirements and usage. -- Discovering what is available on the platform. For example, `libpng` might - be required by the project to process images in the PNG format, and it may or may not - be available on the platform. Alternatively, it might be available, but not with a - suitable configuration for the project needs. You may need to - maintain a custom version of required dependencies. +- Discovering what is available on the platform. For example, `libpng` might be + required by the project to process images in the PNG format, and it may or may + not be available on the platform. Alternatively, it might be available, but + not with a suitable configuration for the project needs. You may need to + maintain a custom version of required dependencies. - Selecting project features: in some cases, projects might offer some degree of configuration, for example to disable support for PNG format images when a - user knows that a feature will never be used. This is done to avoid bloating the - application with never used code and functionality. + user knows that a feature will never be used. This is done to avoid bloating + the application with never used code and functionality. The second aspect is about building the project, which covers: - Compiling the human readable source code to produce binaries (executables and @@ -56,9 +68,9 @@ The second aspect is about building the project, which covers: they spend most of their time in an edit-compile-run loop. These two aspects are so common that tools are available to ease development and -cover all situations and platforms. The tool used for this project is +cover all situations and platforms. The tool used for this project is CMake. CMake is available on all platforms and used by -numerous projects, from very small projects to large +numerous projects, from very small projects to large projects like [LLVM](https://www.llvm.org) or [Qt](https://www.qt.io/). ## Directory structure @@ -117,7 +129,7 @@ applications' source code will be located in `src/`. ## Add a demo application -There is nothing like creating the canonical `Hello, World!` application. +There is nothing like creating the canonical `Hello, World!` application. Use your favorite text editor or IDE to create the file `src/howdy.cpp` and add the following content to it: @@ -187,7 +199,8 @@ CXX=clang++ cmake -G Ninja -B build -S . -- Build files have been written to: .../chapter-1/build ``` -To use the default build system, Unix Makefiles, you can just the `-G Ninja` above. +To use the default build system, Unix Makefiles, you can just omit the `-G Ninja` +from the command line. Now that your project is configured, build it with: @@ -243,27 +256,33 @@ Now, you can create a program that will make use of the {{< include-code CPP "content/learning-paths/cross-platform/matrix/projects/chapter-1/src/getVersion.cpp" >}} -Finally, add the instructions below in the top-level `CMakeLists.txt` -to build the Matrix library, with `add_library`, and instruct CMake where the -Matrix library header files can be found with `target_include_directories` (and -specify along the way that C++17 is to be used for the Matrix library with -`target_compile_features`), and eventually compile our `src/getVersion.cpp` file -and link it to the Matrix library with `add_executable` and -`target_link_library` to produce the `matrix-getVersion` executable: +Finally, add the instructions below in the top-level `CMakeLists.txt`: {{< include-code TXT "content/learning-paths/cross-platform/matrix/projects/chapter-1/CMakeLists.txt" >}} -Now build and run the program with: +The `add_library` instructs CMake how to build the Matrix library. The +`target_include_directories` specifies where the Matrix library header are +located, and the `target_compile_features` specifies that C++17 is the version +of the C++ language that is used by the Matrix library. The `matrix-getVersion` +executable is compiled from the `src/getVersion.cpp` source file with the +`add_executable` command and has to be linked with our Matrix library with the +`target_link_library` command. -```BASH { output_lines = "2-3,5" } +Now build the program with: + +```BASH { output_lines = "2" } ninja [6/6] Linking CXX executable matrix-getVersion +``` +and run it with: + +```BASH { output_lines = "2" } ./matrix-getVersion Using Matrix version: 0.1.0 ``` -Congratulations, you have constructed a library and a program to test it. +Congratulations, you have constructed a library and a program to test it. ## What have you achieved so far ? @@ -301,7 +320,7 @@ to invoke the compiler, build libraries, and link with those libraries on each o those platforms. On top of hiding the platform specific details, CMake also does not force a -development environment onto project developers as you can use your favorite editor or IDE. +development environment onto project developers as you can use your favorite editor or IDE. For example, Visual Studio Code can work seamlessly with CMake thanks to some plugins, and CMake can generate project files for several popular IDEs, such as Xcode, Sublime Text, Eclipse, CodeBlocks, and CodeLite. You can run `cmake --help` to get a diff --git a/content/learning-paths/cross-platform/matrix/2-testing.md b/content/learning-paths/cross-platform/matrix/2-testing.md index c23ecdffd..ab61387d6 100644 --- a/content/learning-paths/cross-platform/matrix/2-testing.md +++ b/content/learning-paths/cross-platform/matrix/2-testing.md @@ -13,7 +13,7 @@ might appear unnecessary in the beginning, tests provide significant advantages: - Confidence for developers, when adding new functionality, or when porting - to a new platform + to a new platform - Confidence for the users that the quality is good - Ability to catch regressions - Show how to use the library in practice @@ -24,20 +24,20 @@ You'll notice that setting up testing comes before the actual library code devel Many unit testing frameworks exist in general, and C++ is not short of them as you can notice in this [wikipedia -article](https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C++). +article](https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C++). This project uses [GoogleTest](https://github.com/google/googletest) as the testing framework. ## Setup GoogleTest -You could rely on the operating system platform to provide GoogleTest, then +You could rely on the operating system platform to provide GoogleTest, then ask developers to install it on each computer they use, but this feels like an -unnecessary step. +unnecessary step. As testing is a corner stone of your Matrix library development, GoogleTest should be installed automatically as a dependency in the -build tree of your project. +build tree of your project. -One great feature of GoogleTest is that it provides a seamless integration with CMake. +One great feature of GoogleTest is that it provides a seamless integration with CMake. Adding external dependencies is easily done with CMake. This is done with a separate `CMakeLists.txt` file, placed in the `external/` directory. This file covers @@ -48,11 +48,11 @@ Create the file `external/CMakeLists.txt` with the following content: {{< include-code TXT "content/learning-paths/cross-platform/matrix/projects/chapter-2/external/CMakeLists.txt" >}} -You may notice a new new CMake feature, variables. Variables start with the `$` +You may notice a new CMake feature: variables. Variables start with the `$` character and have a name in between curly braces. A CMake variable can be set by -the CMake itself, or by the user, and they can be modified or used. +the CMake itself, or by the user, and they can be modified or used. -In this case, the variable `${EXTERNAL_PROJECT_CMAKE_ARGS}` is set with the options to +In this case, the variable `${EXTERNAL_PROJECT_CMAKE_ARGS}` is set with the options to pass to CMake for installing the external dependencies: - `${CMAKE_CXX_COMPILER}`: the C++ compiler used by CMake @@ -138,7 +138,7 @@ At configuration time, CMake will download, build and install GoogleTest and make it available to your project using `find_package`. Now if you build the project, CMake notices it has been updated and will -perform all necessary steps. +perform all necessary steps. The output belows shows that besides the executable, CMake has configured, built, and installed GoogleTest. @@ -242,7 +242,7 @@ Now that GoogleTest is available, you can add the first test. In order to keep the project clean, all tests go inside a `tests/` directory. One file, `tests/main.cpp`, contains the top level directions for -testing. +testing. As a project may contain many tests, it's good to split them across several files inside the `tests/` directory. @@ -261,7 +261,7 @@ This test invokes `getVersion` and checks that the The last step is to tell CMake about the tests. All tests will linked together in a single `matrix-test` executable (linking with the Matrix library and GoogleTest), and you will add a convenience `check` target so the -tests can be run easily. +tests can be run easily. Add the following at the bottom of the top-level `CMakeLists.txt`: @@ -276,9 +276,9 @@ add_custom_target(check ) ``` -Run the build again and test: +Run the build again: -```BASH { output_lines = "3-21" } +```BASH { output_lines = "3-9" } cd build ninja ... @@ -288,7 +288,12 @@ ninja -- Generating done (0.0s) -- Build files have been written to: .../chapter-2/build [3/3] Linking CXX executable matrix-test -$ ninja check +``` + +And run the tests: + +```BASH { output_lines = "2-12" } +ninja check ... [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. @@ -341,5 +346,5 @@ CMake makes it easy to use GoogleTest as an external project. Adding unit tests as you go is now very easy. You have created the unit testing environment for your Matrix library and -added a test. The infrastructure is now in place to +added a test. The infrastructure is now in place to implement the core of the Matrix processing library. diff --git a/content/learning-paths/cross-platform/matrix/3-code-1.md b/content/learning-paths/cross-platform/matrix/3-code-1.md index 507f53bfe..8967a75ae 100644 --- a/content/learning-paths/cross-platform/matrix/3-code-1.md +++ b/content/learning-paths/cross-platform/matrix/3-code-1.md @@ -7,21 +7,20 @@ layout: learningpathall --- With the infrastructure setup to build and test the Matrix library, it's -now time to actually code the library. +now time to actually code the library. -In this section, you will add the -core functionality of the library as well as unit tests to ensure functional -correctness. +In this section, you will add the core functionality of the library as well as +unit tests to ensure functional correctness. ## About error handling -Error handling is a critical aspect of programming, -balancing safety and security with performance. Depending on the context, the -correct balance point may vary. For example, in the case of high performance -computing for weather forecast, the dataset is extremely large (and ever -increasing), but can be considered secure and curated. On the other hand, if the -data used in the computations can be adversely computed or altered, it is -preferable to have checks, such as out of bound access, enabled. +Error handling is a critical aspect of programming, balancing safety and +security with performance. Depending on the context, the correct balance point +may vary. For example, in the case of high performance computing for weather +forecast, the dataset is extremely large (and ever increasing), but can be +considered secure and curated. On the other hand, if the data used in the +computations can be adversely computed or altered, it is preferable to have +checks, such as out of bound access, enabled. In the Matrix processing library, you will implement 2 types of checks: @@ -39,19 +38,29 @@ application (if it can). Error handling, and especially recovering from errors, can be a very complex topic. At the top of file `include/Matrix/Matrix.h`, include `` to get the -C-style assertions declarations for checks in `Debug` mode only. +C-style assertions declarations for checks in `Debug` mode only: + +```CPP +#pragma once + +#include + +namespace MatComp { +``` Next, add a `die` function to call whenever the library needs to -exit. Paste the code below right under get `getVersion` declaration in -`include/Matrix/Matrix.h`. +exit. Paste the code below right under the `const Version &getVersion();` declaration in +`include/Matrix/Matrix.h`: ```CPP +/// Get the Matrix library version information. +const Version &getVersion(); /// Immediately terminates the application with \p reason as the error message /// and the EXIT_FAILURE error code. It will also print the file name (\p /// fileName) and line number (\p lineNumber) that caused that application to /// exit. -[[noreturn]] void die(const char *fileName, size_t lineNumber, +[[noreturn]] void die(const char *fileName, std::size_t lineNumber, const char *reason); ``` @@ -63,11 +72,11 @@ called. This information was previously passed thru compiler specific annotations, but now C++ provides a generic way to pass such information to the different compilers. -You also need to provide a body for the `die` function. +You also need to provide a body for the `die` function. Open `lib/Matrix/Matrix.cpp` and include at the top of the file: -- `` : to get the declaration of `exit` and `EXIT_FAILURE` +- `` : to get the declaration of `exit` and `EXIT_FAILURE` - `` : to get support for input/output, in order to emit useful information about the reason for exiting the program. @@ -86,7 +95,7 @@ ninja The Matrix library will be able to deal with 1x1 matrices (i.e. scalar numbers), 1xN matrices (row-vector), Nx1 matrices (column vectors) and NxM -matrices. +matrices. The matrix array will be a single memory region, where the matrix elements are stored in [row major @@ -104,16 +113,25 @@ constructs in the language to deal safely with memory; you will use `std::unique_ptr` which guaranties that the Matrix class will be safe from a whole range of memory management errors -Add the following includes at the top of `include/Matrix/Matrix.h`: +Add the following includes at the top of `include/Matrix/Matrix.h`, right under +the '' include: ```CPP +#include +#include +#include +#include #include #include ``` -`` gives access to the `unique_ptr` and `type_traits` allow you to -query information on the Matrix element types, either to check that a type is -allowed or to select an optimized implementation at compile time. +`` provides useful declarations like `memcpy` that will be used to copy +matrices' content around. `<ìnitializer_list>`, introduced with C++11, provides +the declaration of the `initializer_list` type, which is a lightweight +abstraction that allows creating an array of constant objects. `` gives +access to the `unique_ptr` and `type_traits` allows to query information on the +Matrix element types, either to check that a type is allowed or to select an +optimized implementation at compile time. Add the following lines to `include/Matrix/Matrix.h` in the MatComp namespace under the `die` function declaration: @@ -182,22 +200,22 @@ class (in `include/Matrix/Matrix.h`): You will use the method to allocate memory for the element array. `new` will get enough memory to store `numElements` of type `Ty`. This is stored in the `data` `unique_ptr` with the `reset` function which enforces freeing memory -previously referred to by `data`. +previously referred to by `data`. If allocation fails, which is signaled with a -`nullptr` (a zero pointer), `data` will not be valid and the program should be +`nullptr` (a zero pointer), `data` will not be valid and the program should be terminated. This helper method is made private because it is only intended to be used by other methods from the `Matrix` class. Users of the `Matrix` objects have no reason for directly invoking this method. With this in place, you can add some constructors in the public section of -the `Matrix` class. +the `Matrix` class. The very first `Matrix` you should be able to construct is an invalid `Matrix`. While this might sound strange, this is actually very useful in practice, to signal some errors. In this case, an invalid `Matrix` is a matrix with 0 rows and 0 columns. You can use the default -constructor (a constructor with no parameters) for this. +constructor (a constructor with no parameters) for this. Add the following code in the public section of class `Matrix` in `include/Matrix/Matrix.h`: @@ -215,10 +233,9 @@ propagated for optimizations. You can now add a boolean conversion, using the conversion operator, that will allow to check whether a `Matrix` instance is valid or not. It will return -`false` if the `Matrix` object is invalid, `true` otherwise. +`false` if the `Matrix` object is invalid, `true` otherwise. -Add the following -method in the public section of `Matrix`: +Add the following method in the public section of `Matrix`: ```CPP /// Returns true if this matrix is valid. @@ -227,7 +244,7 @@ method in the public section of `Matrix`: } ``` -With those 2 methods in place, it's now high time to add some tests. +With those 2 methods in place, it's now time to add some tests. Create file `tests/Matrix.cpp` and add the following code to it: @@ -247,6 +264,17 @@ TEST(Matrix, defaultConstruct) { Matrix m1; EXPECT_FALSE(m1); } + +TEST(Matrix, booleanConversion) { + EXPECT_FALSE(Matrix()); + EXPECT_FALSE(Matrix()); + + EXPECT_TRUE(Matrix(1, 1)); + EXPECT_TRUE(Matrix(1, 1)); + + EXPECT_TRUE(Matrix(1, 1, 1)); + EXPECT_TRUE(Matrix(1, 1, 2.0)); +} ``` Next, add `tests/Matrix.cpp` to the list of files used for the `Matrix` unit @@ -265,27 +293,29 @@ default constructor. In both cases, these matrices are expected to be invalid. You should now check if tests pass: -```BASH { output_lines = "4-16" } +```BASH { output_lines = "4-18" } cd build ninja ninja check ... -[==========] Running 2 tests from 1 test suites. +[==========] Running 3 tests from 1 test suites. [----------] Global test environment set-up. -[----------] 2 tests from Matrix +[----------] 3 tests from Matrix [ RUN ] Matrix.defaultConstruct [ OK ] Matrix.defaultConstruct (0 ms) +[ RUN ] Matrix.booleanConversion +[ OK ] Matrix.booleanConversion (0 ms) [ RUN ] Matrix.getVersion [ OK ] Matrix.getVersion (0 ms) -[----------] 2 tests from Matrix (0 ms total) +[----------] 3 tests from Matrix (0 ms total) [----------] Global test environment tear-down -[==========] 2 tests from 1 test suites ran. (0 ms total) -[ PASSED ] 2 tests. +[==========] 3 tests from 1 test suites ran. (0 ms total) +[ PASSED ] 3 tests. ``` Constructing an invalid `Matrix` is very useful, but does not -really make the `Matrix` class very helpful. +really make the `Matrix` class very helpful. You can add some getters, methods that allow you to query some information about a `Matrix` object: @@ -310,8 +340,8 @@ Add those methods in the public section of `Matrix` in size_t getSizeInBytes() const { return numRows * numColumns * sizeof(Ty); } ``` -Next, modify the `defaultConstruct` test that you previously added so that it now -looks like: +Next, modify the `defaultConstruct` in `tests/Matrix.cpp` test that you +previously added so that it now looks like: ```CPP TEST(Matrix, defaultConstruct) { @@ -371,25 +401,27 @@ and dimensions can be constructed. Compile and test again, all should pass: -```BASH { output_lines = "4-18" } +```BASH { output_lines = "4-20" } cd build ninja ninja check ... -[==========] Running 3 tests from 1 test suites. +[==========] Running 4 tests from 1 test suites. [----------] Global test environment set-up. -[----------] 3 tests from Matrix +[----------] 4 tests from Matrix [ RUN ] Matrix.defaultConstruct [ OK ] Matrix.defaultConstruct (0 ms) [ RUN ] Matrix.uninitializedConstruct [ OK ] Matrix.uninitializedConstruct (0 ms) +[ RUN ] Matrix.booleanConversion +[ OK ] Matrix.booleanConversion (0 ms) [ RUN ] Matrix.getVersion [ OK ] Matrix.getVersion (0 ms) -[----------] 3 tests from Matrix (0 ms total) +[----------] 4 tests from Matrix (0 ms total) [----------] Global test environment tear-down -[==========] 3 tests from 1 test suites ran. (0 ms total) -[ PASSED ] 3 tests. +[==========] 4 tests from 1 test suites ran. (0 ms total) +[ PASSED ] 4 tests. ``` The `Matrix` class is missing 2 important methods: @@ -429,7 +461,7 @@ matrices to a known value. Let's add it to `Matrix` in } ``` -You should be getting the pattern now. +You should be getting the pattern now. Add tests for those 3 methods in `tests/Matrix.cpp`: @@ -486,14 +518,14 @@ others. Compile and check again. It's important to ensure that the project works at each step and did not regress any of the previous steps. -```BASH { output_lines = "4-24" } +```BASH { output_lines = "4-26" } cd build ninja ninja check ... -[==========] Running 6 tests from 1 test suites. +[==========] Running 7 tests from 1 test suites. [----------] Global test environment set-up. -[----------] 6 tests from Matrix +[----------] 7 tests from Matrix [ RUN ] Matrix.defaultConstruct [ OK ] Matrix.defaultConstruct (0 ms) [ RUN ] Matrix.uninitializedConstruct @@ -504,26 +536,30 @@ ninja check [ OK ] Matrix.getElement (0 ms) [ RUN ] Matrix.setElement [ OK ] Matrix.setElement (0 ms) +[ RUN ] Matrix.booleanConversion +[ OK ] Matrix.booleanConversion (0 ms) [ RUN ] Matrix.getVersion [ OK ] Matrix.getVersion (0 ms) -[----------] 6 tests from Matrix (0 ms total) +[----------] 7 tests from Matrix (0 ms total) [----------] Global test environment tear-down -[==========] 6 tests from 1 test suites ran. (0 ms total) -[ PASSED ] 6 tests. +[==========] 7 tests from 1 test suites ran. (0 ms total) +[ PASSED ] 7 tests. ``` Congratulations, you are almost done with constructors! The last needed constructor is one that will allow you to build matrices with -arbitrary values. +arbitrary values. Add the constructor below to the public part of `Matrix` in -`include/Matrix/Matrix.h`. +`include/Matrix/Matrix.h`. -The C++ `std::initializer_list` enables users -to provide a list of literal values (in row major order) to use to initialize -the matrix with: +The C++ `std::initializer_list` enables users to provide a list of literal +values (in row major order) to use to initialize the matrix with: + +```CPP +``` ```CPP /// Construct a \p numRows x \p numColumns Matrix with elements @@ -619,7 +655,7 @@ TEST(Matrix, initializerListAssign) { } ``` -Make sure that the project builds and the tests pass. +Make sure that the project builds and the tests pass. ## Constructors with memory management @@ -638,7 +674,7 @@ the `move` semantic, where a destination object steals the content from the source object, making the source object invalid. One important time in an object life is to use the `copy` or the `move` semantic -is at construction time, when an object is built from another object. +is at construction time, when an object is built from another object. Add a copy constructor and a move constructor in the public part of `Matrix` in `include/Matrix/Matrix.h`: @@ -864,13 +900,13 @@ TEST(Matrix, identity) { Compile and check again, all test should pass: -```BASH { output_lines = "4-41" } +```BASH { output_lines = "4-43" } cd build ninja ninja check -[==========] Running 15 tests from 1 test suites. +[==========] Running 16 tests from 1 test suites. [----------] Global test environment set-up. -[----------] 15 tests from Matrix +[----------] 16 tests from Matrix [ RUN ] Matrix.defaultConstruct [ OK ] Matrix.defaultConstruct (0 ms) [ RUN ] Matrix.uninitializedConstruct @@ -899,22 +935,24 @@ ninja check [ OK ] Matrix.ones (0 ms) [ RUN ] Matrix.identity [ OK ] Matrix.identity (0 ms) +[ RUN ] Matrix.booleanConversion +[ OK ] Matrix.booleanConversion (0 ms) [ RUN ] Matrix.getVersion [ OK ] Matrix.getVersion (0 ms) -[----------] 15 tests from Matrix (0 ms total) +[----------] 16 tests from Matrix (0 ms total) [----------] Global test environment tear-down -[==========] 15 tests from 3 test suites ran. (0 ms total) -[ PASSED ] 15 tests. +[==========] 16 tests from 3 test suites ran. (0 ms total) +[ PASSED ] 16 tests. ``` ## Display matrices At some point, one will want to *see* the content of a `Matrix`, so add -a simple output operator to dump the matrix content to a stream. +a simple output operator to dump the matrix content to a stream. -Add this code -at the very end of `include/Matrix/Matrix.h`, outside of the `MatComp` namespace. +Add this code at the very end of `include/Matrix/Matrix.h`, outside of the +`MatComp` namespace: ```CPP /// Dump this Matrix in textual format to output stream \p os. @@ -956,8 +994,9 @@ TEST(Matrix, dump) { } ``` -This test makes uses of string streams, which enable you to capture and check the -output without actually writing to the standard output. You'll need to add an include file at the top of `tests/Matrix.cpp` for the above test to compile: +This test makes uses of string streams, which enable you to capture and check +the output without actually writing to the standard output. You'll need to add +an include file at the top of `tests/Matrix.cpp` for the above test to compile: ```CPP #include @@ -987,7 +1026,7 @@ Add these to the public section of `Matrix` in `include/Matrix/Matrix.h`: return false; return true; } - /// Returns tur iff matrices do not compare equal. + /// Returns true iff matrices do not compare equal. bool operator!=(const Matrix &rhs) const { return !(*this == rhs); } ``` @@ -1025,15 +1064,15 @@ TEST(Matrix, notEqual) { } ``` -Check again if the tests build and pass: +Check again if the tests build and pass: -```BASH { output_lines = "4-47" } +```BASH { output_lines = "4-49" } cd build ninja ninja check -[==========] Running 18 tests from 1 test suites. +[==========] Running 19 tests from 1 test suites. [----------] Global test environment set-up. -[----------] 18 tests from Matrix +[----------] 19 tests from Matrix [ RUN ] Matrix.defaultConstruct [ OK ] Matrix.defaultConstruct (0 ms) [ RUN ] Matrix.uninitializedConstruct @@ -1062,6 +1101,8 @@ ninja check [ OK ] Matrix.ones (0 ms) [ RUN ] Matrix.identity [ OK ] Matrix.identity (0 ms) +[ RUN ] Matrix.booleanConversion +[ OK ] Matrix.booleanConversion (0 ms) [ RUN ] Matrix.equal [ OK ] Matrix.equal (0 ms) [ RUN ] Matrix.notEqual @@ -1070,11 +1111,11 @@ ninja check [ OK ] Matrix.dump (0 ms) [ RUN ] Matrix.getVersion [ OK ] Matrix.getVersion (0 ms) -[----------] 18 tests from Matrix (0 ms total) +[----------] 19 tests from Matrix (0 ms total) [----------] Global test environment tear-down -[==========] 18 tests from 1 test suites ran. (0 ms total) -[ PASSED ] 18 tests. +[==========] 19 tests from 1 test suites ran. (0 ms total) +[ PASSED ] 19 tests. ``` Congratulations, you now have a working library! @@ -1112,7 +1153,7 @@ After this rather long exercise, you have a minimalistic, yet fully functional core for the matrix processing library, with some level of regression testing. Modern C++ enabled you to express move and copy -semantics, and to use smart pointers to make memory management easy. +semantics, and to use smart pointers to make memory management easy. The compiler will also catch a large number of type or misuse errors. With this core functionality in place, you have all you need to actually implement matrix diff --git a/content/learning-paths/cross-platform/matrix/4-code-2.md b/content/learning-paths/cross-platform/matrix/4-code-2.md index 6122dc50a..e881869e5 100644 --- a/content/learning-paths/cross-platform/matrix/4-code-2.md +++ b/content/learning-paths/cross-platform/matrix/4-code-2.md @@ -6,17 +6,17 @@ weight: 5 layout: learningpathall --- -In the previous section, you created the core (or the boiler plate) -needed for `Matrix` objects. They can now be constructed, assigned to/from, -and dumped to the screen, but the library is still missing actual matrix -operations: add, subtract, and multiply. +In the previous section, you created the core (or the boiler plate) needed for +`Matrix` objects. They can now be constructed, assigned to/from, and dumped to +the screen, but the library is still missing actual matrix operations: add, +subtract, and multiply. In this section, you will add the missing operations. ## Operations architecture When designing matrix processing, it's desirable to separate 2 concerns: -- the traversal of the matrices +- the traversal of the matrices - the actual data processing This allows you to develop the independent parts and then compose them, allowing for @@ -91,8 +91,8 @@ implemented as classes with the function operator (`operator()`) defined. This makes them suitable for using in bigger algorithms and is a common pattern used for example in the C++ standard library. -One point worth mentioning is related to the `Abs` class: depending on the type used -at instantiation, the compiler will select an optimized implementation for +One point worth mentioning is related to the `Abs` class: depending on the type +used at instantiation, the compiler will select an optimized implementation for unsigned types, and there is no need to compute the absolute value of an always positive value. This optimization is transparent to users. @@ -203,6 +203,16 @@ The tests do not attempt to check all corner cases. Please note the use of type traits (from ``) such as `max` to get the maximum value representable for a given type. +As those tests have been added to a new source file, it needs to be known to the +build system, so add it now to the matrix-test target in `CMakeLists.txt`: + +```TXT +add_executable(matrix-test tests/main.cpp + tests/Matrix.cpp + tests/Operators.cpp + tests/Version.cpp) +``` + ```BASH { output_lines = "4-61" } cd build ninja @@ -294,15 +304,16 @@ First, create a `applyEltWiseUnaryOp` helper routine in the public section of } ``` -Although `applyEltWiseUnaryOp` does not need to be a public -member, it allows users to add their own operations should they lack one -specific to their usage. In other words, this provides easy extendability for -the library. `applyEltWiseUnaryOp` also checks at compile time, with the -`static_assert` statement, that the operation that it has to perform is a unary -operation. +Although `applyEltWiseUnaryOp` does not need to be a public member, it allows +users to add their own operations should they lack one specific to their usage. +In other words, this provides easy extendability for the library. +`applyEltWiseUnaryOp` also checks at compile time, with the `static_assert` +statement, that the operation that it has to perform is a unary operation. -You can eventually add, still in the `Matrix` public section in -`include/Matrix/Matrix.h`, the `neg`, `abs`, `sqrt` and `log` member operations: +Now include `Matrix/Operators.h` at the top of `Matrix/Matrix.h` so you can use +the `Neg`, 'Abs`, 'Sqrt` and `log` with `applyEltWiseUnaryOp`. In the `Matrix` +public section in `include/Matrix/Matrix.h`, add the `neg`, `abs`, `sqrt` and +`log` member operations: ```CPP /// Apply negate to each element of this Matrix. @@ -319,7 +330,7 @@ You can eventually add, still in the `Matrix` public section in ``` Those member operations are modifying the object in place, which might not be -desirable, so you can also provide a functional version of these +desirable, so you will also provide a functional version of these operators, that is to say a version that will modify a copy of the object instead. This is achieved by providing functions outside of the `Matrix` class (but still in the `MatComp` namespace). Add these after the `Matrix` class @@ -353,7 +364,7 @@ Users can now write either: - `abs(m)` which will return a copy of `m` with the absolute value of each of `m` elements, leaving `m` untouched. -Of course, each of these function needs to have tests. +Of course, each of these function needs to have tests. Add the following tests in `tests/Matrix.cpp`: @@ -502,11 +513,11 @@ ninja check ## Binary scalar operations -Users also need to have binary operations, that is -operations that have 2 inputs: addition, subtraction, and multiplication are the -most popular representatives of binary operations. Using the same pattern than -for unary operations, add those binary operations to -`include/Matrix/Operators.h`: +Users also need to have binary operations, that is operations that have 2 +inputs: addition, subtraction, and multiplication are the most popular +representatives of binary operations. Using the same pattern than for unary +operations, add those binary operations to `include/Matrix/Operators.h` in +the `MatComp` namespace: ```CPP struct binaryOperation {}; @@ -538,7 +549,6 @@ template class Mul : public binaryOperation { Add the tests to `tests/Operators.cpp`: - ```CPP TEST(binaryOperator, Add) { EXPECT_EQ(MatComp::Add()(1, 2), uint8_t(3)); @@ -938,7 +948,7 @@ Last, but not least, the `Matrix` class still needs the most important operation matrix multiplication. Add the `multiply` function, outside of the `Matrix` class, but in the -`MatComp` namespace in `include/Matrix/Operators.h`. `multiply` will check that +`MatComp` namespace in `include/Matrix/Matrix.h`. `multiply` will check that the arguments have compatible dimensions, then create an uninitialized matrix that will hold the multiplication result and eventually perform the multiplication to fill it. @@ -1110,7 +1120,7 @@ content. ## What have you achieved so far? -At this stage, the code structure looks like: +At this stage, the code structure looks like: ```TXT Matrix/ diff --git a/content/learning-paths/cross-platform/matrix/_index.md b/content/learning-paths/cross-platform/matrix/_index.md index 2951b03d4..9cd12ba95 100644 --- a/content/learning-paths/cross-platform/matrix/_index.md +++ b/content/learning-paths/cross-platform/matrix/_index.md @@ -1,5 +1,5 @@ --- -title: Learn about modern C++ library development +title: Develop a native C++ library on an Arm based machine minutes_to_complete: 120 @@ -12,10 +12,11 @@ learning_objectives: prerequisites: - An Arm based computer running Linux, macOS, or Windows - An intermediate understanding of C++ programming + - A decent IDE author_primary: Arnaud de Grandmaison -draft: true +draft: true ### Tags skilllevels: Advanced diff --git a/content/learning-paths/cross-platform/matrix/_review.md b/content/learning-paths/cross-platform/matrix/_review.md index 94f5648f0..256a49482 100644 --- a/content/learning-paths/cross-platform/matrix/_review.md +++ b/content/learning-paths/cross-platform/matrix/_review.md @@ -14,7 +14,7 @@ review: - questions: question: > - When should you use unit testing? + When should you use unit testing ? answers: - Once the project is finished, to ensure it works - Right from the start so tests can be added along the development and ensure it works bottom up. @@ -23,6 +23,15 @@ review: explanation: > While the first answer is not fully wrong, it's not that bad if a program has tests, the second approach is the best as it's much easier to add test along the way at the time the functionality is developed. + - questions: + question: > + Supporting Matrices with different data type requires to rewrite the operators ? + answers: + - Yes + - No + correct_answer: 2 + explanation: > + C++ templates are a powerful feature as they enable generic programming, where code is parameterized by types. This allows to write code once, and let the compiler specialize it for a specific types. # ================================================================================ # FIXED, DO NOT MODIFY diff --git a/content/learning-paths/cross-platform/matrix/projects/chapter-3/include/Matrix/Matrix.h b/content/learning-paths/cross-platform/matrix/projects/chapter-3/include/Matrix/Matrix.h index 687521560..17eca879e 100644 --- a/content/learning-paths/cross-platform/matrix/projects/chapter-3/include/Matrix/Matrix.h +++ b/content/learning-paths/cross-platform/matrix/projects/chapter-3/include/Matrix/Matrix.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -158,7 +159,7 @@ template class Matrix { return false; return true; } - /// Returns tur iff matrices do not compare equal. + /// Returns true iff matrices do not compare equal. bool operator!=(const Matrix &rhs) const { return !(*this == rhs); } /// Access Matrix element at (\p row, \p col) by reference. diff --git a/content/learning-paths/cross-platform/matrix/projects/chapter-4/include/Matrix/Matrix.h b/content/learning-paths/cross-platform/matrix/projects/chapter-4/include/Matrix/Matrix.h index a8b56f83d..70e584932 100644 --- a/content/learning-paths/cross-platform/matrix/projects/chapter-4/include/Matrix/Matrix.h +++ b/content/learning-paths/cross-platform/matrix/projects/chapter-4/include/Matrix/Matrix.h @@ -3,6 +3,7 @@ #include "Matrix/Operators.h" #include +#include #include #include #include @@ -160,7 +161,7 @@ template class Matrix { return false; return true; } - /// Returns tur iff matrices do not compare equal. + /// Returns true iff matrices do not compare equal. bool operator!=(const Matrix &rhs) const { return !(*this == rhs); } /// Access Matrix element at (\p row, \p col) by reference. diff --git a/content/learning-paths/embedded-systems/avh_greengrass/2setup.md b/content/learning-paths/embedded-systems/avh_greengrass/2setup.md index 4e1edd4a2..f29340796 100644 --- a/content/learning-paths/embedded-systems/avh_greengrass/2setup.md +++ b/content/learning-paths/embedded-systems/avh_greengrass/2setup.md @@ -22,9 +22,11 @@ Click the `Create an AWS Account` button to start creating a new account. ## Create a Device -Log in to AVH to begin. +Log in to [AVH](https://app.avh.arm.com/) to begin. -From the AVH dashboard, click the `Create Device` button. You will be presented with a list of devices to choose from. +From the AVH dashboard, click the `Create Device` button. Next, select the project to add the device to. + +You will be presented with a list of devices to choose from. Select Raspberry Pi 4 from the list of devices and proceed to the configure dialog. diff --git a/content/learning-paths/embedded-systems/avh_greengrass/_index.md b/content/learning-paths/embedded-systems/avh_greengrass/_index.md index fc8003f57..7c5ff1788 100644 --- a/content/learning-paths/embedded-systems/avh_greengrass/_index.md +++ b/content/learning-paths/embedded-systems/avh_greengrass/_index.md @@ -6,13 +6,13 @@ minutes_to_complete: 30 who_is_this_for: This is an introductory topic for embedded software developers interested in AWS IoT Greengrass. learning_objectives: - - Start a Raspberry Pi Arm Virtual Hardware instance - - Deploy pre-built AWS IoT Greengrass components on Arm Virtual Hardware + - Start a Raspberry Pi Arm Virtual Hardware instance. + - Deploy pre-built AWS IoT Greengrass components on Arm Virtual Hardware. prerequisites: - - An Amazon AWS account - - An Arm Virtual Hardware account - - Some familiarity with embedded Linux + - An Amazon AWS account. + - An Arm Virtual Hardware account. + - Some familiarity with embedded Linux. author_primary: Michael Hall diff --git a/content/learning-paths/embedded-systems/avh_greengrass/create_device.png b/content/learning-paths/embedded-systems/avh_greengrass/create_device.png index 0d0602b40..213992d32 100644 Binary files a/content/learning-paths/embedded-systems/avh_greengrass/create_device.png and b/content/learning-paths/embedded-systems/avh_greengrass/create_device.png differ diff --git a/content/learning-paths/microcontrollers/img_nn_stcube/_index.md b/content/learning-paths/microcontrollers/img_nn_stcube/_index.md index 9712b8d26..e1cc5fc8f 100644 --- a/content/learning-paths/microcontrollers/img_nn_stcube/_index.md +++ b/content/learning-paths/microcontrollers/img_nn_stcube/_index.md @@ -18,10 +18,6 @@ prerequisites: author_primary: Pareena Verma -### Ronan show this version -draft: false - - ### Tags skilllevels: Advanced subjects: ML diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/deployment.md b/content/learning-paths/servers-and-cloud-computing/ecs/deployment.md index 0a9961873..87911263f 100644 --- a/content/learning-paths/servers-and-cloud-computing/ecs/deployment.md +++ b/content/learning-paths/servers-and-cloud-computing/ecs/deployment.md @@ -26,15 +26,15 @@ You will need an [AWS account](https://portal.aws.amazon.com/billing/signup?nc2= Login to your AWS account as the root user and search for IAM. -![ecs1 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/4b23375b-a3b8-49f7-b77f-1f3651b2ecf2) +![ecs1 #center](./images/ecs1.png) -From the IAM dashboard select `Users` from the left menu and click on `Add user` from the top of the page. +From the IAM dashboard select `Users` from the left menu and click on `Create user` from the top of the page. -![ecs2 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/8659eace-12fb-40cd-a239-2a6ca5521d97) +![ecs2 #center](./images/ecs2.png) -On the `Add user` screen enter a username and select the check box before `Provide user access to the AWS Management Console`. Then select `I want to create an IAM user` and click `Next` +On the `Create user` screen enter a username and select the check box before `Provide user access to the AWS Management Console` and click `Next` -![ecs3 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/0efeb281-2b19-4bc7-b132-10b62f609755) +![ecs3 #center](./images/ecs3.png) ### Create an ECR policy @@ -42,17 +42,17 @@ You will need access to the Amazon Elastic Container Registry (ECR) to store con To do so, select `Create policy`. -![ecs4 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/43763182-a73e-435d-8a29-05cff61c59ee) +![ecs4 #center](./images/ecs4.png) Under `Service`, select `Elastic Container Registry`. Select `All Elastic Container Registry actions (ecr:*)` under `Actions allowed`. -![ecs5 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/0e500091-a103-4387-a862-d0c17eb51036) +![ecs5 #center](./images/ecs5.png) Under `Resources`, select `specific` and `Add ARN`. Here you can select the `region` and select `Any` for Repository name under `This account` and click on `Add ARNs`. -![ecs6 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/e2feb854-4bdc-4f38-bf75-d1defbf6e75e) +![ecs6 #center](./images/ecs6.png) Skip the tags by clicking `Next`. @@ -68,11 +68,11 @@ Select `Attach existing policies directly` under `Set permissions` and search fo Select the checkbox next to the policies. -![ecs7 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/c903a3d6-4908-41ab-ad03-3f3f53053fe2) +![ecs7 #center](./images/ecs7.png) Select `Next` to review and then `Create user`. -![ecs8 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/8e4ca606-56fb-4421-b3b6-4ae2fa6ea203) +![ecs8 #center](./images/ecs8.png) When you create the user you will see a confirmation screen. @@ -82,18 +82,18 @@ A new user is now visible on the `IAM > Users` page. Click on the user and go to Click on `Create access key` -![ecs9 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/996129d3-7d59-43e2-b1d8-84373f0a9d3e) +![ecs9 #center](./images/ecs9.png) -![ecs10 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/1c59aa74-ac56-4477-90c1-5d601163d373) +![ecs10 #center](./images/ecs10.png) Select `Command Line Interface (CLI)` and click on `Next` -![ecs11 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/7dd0b41b-34d5-419f-937d-9c6ff656be84) +![ecs11 #center](./images/ecs11.png) Add a description and click `Create access key` -![ecs12 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/67ca5f82-67bc-4528-9564-3e7ecb48c886) +![ecs12 #center](./images/ecs12.png) Save `Access key` and `Secret access key`, you will need them to configure the AWS CLI. @@ -107,19 +107,19 @@ Log in to the AWS console with the `test_user` credentials you created earlier. AWS will ask for your `account id`, `username`, and `password`. -![ecs13 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/360c57f3-ec3d-425b-8339-f9050d3cb0bd) +![ecs13 #center](./images/ecs13.png) Change your password when prompted. -![ecs14 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/b5be4ac8-daf5-471d-aab5-782151647ace) +![ecs14 #center](./images/ecs14.png) Once you log in, search for Elastic Container Registry. -![ecs15 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/5b9c2db7-f770-4d6c-a717-167775a5a04e) +![ecs15 #center](./images/ecs15.png) From there fill in the name of the repository as `myapp` and leave the defaults for everything else. -![ecs16 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/eaca4082-371b-4d11-b390-1d0a89423d31) +![ecs16 #center](./images/ecs16.png) Select `Create Repository` in the lower right of the page and your repository will be created. @@ -127,7 +127,7 @@ You will see your repository in the list, and the ARN (here it is called a URI f Copy the URI for the next step. -![ecs17 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/c1463f63-88a2-4912-86e4-e129541b3f56) +![ecs17 #center](./images/ecs17.png) ## Create the Docker image @@ -193,17 +193,17 @@ Search for `Elastic Container Service` and select `Elastic Container Service` From the left menu select `Clusters` and then select `Create cluster` -![ecs18 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/21bb5009-0c2f-40a4-b0b8-4861e8d6cb80) +![ecs18 #center](./images/ecs18.png) Name the cluster and the leave the other options with the default values. Select `Create` -![image #center](https://user-images.githubusercontent.com/87687468/235840668-d13d607d-b546-4d5f-bf95-00b0f57e8322.png) +![ecs19 #center](./images/ecs19.png) A cluster will be created as shown below: -![ecs20 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/0a5d8d23-cb37-4b5c-a32a-faccd194f2e9) +![ecs20 #center](./images/ecs20.png) ## Create an ECS task @@ -213,7 +213,7 @@ To create an ECS Task do the following: Select `Task Definitions` from the left menu. Then select `Create new Task Definition` -![ecs21 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/74d6e0d1-a1a2-49df-a476-cbaf12a2cee3) +![ecs21 #center](./images/ecs21.png) Enter the name of the `Task definition family` in `Task definition configuration` @@ -223,7 +223,7 @@ You can copy this from the ECR dashboard if you haven’t already. Leave everyth Click `Next` -![ecs22 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/649e1811-d322-428e-901c-8b73636e018e) +![ecs22 #center](./images/ecs22.png) {{% notice Note %}} No additional port mapping is needed because Nginx runs on port 80 by default.{{% /notice %}} @@ -231,28 +231,28 @@ Under Environment Section, select `Operating system/Architecture` as `Linux/ARM Click `Next` in the lower right corner of the dialog. -![image #center](https://user-images.githubusercontent.com/87687468/235848013-599bfcbe-27a1-4a47-a7ab-2914081b9b2d.png) +![ecs23 #center](./images/ecs23.png) -![ecs23 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/3d54fea6-2a2d-4f99-90f5-bd44e8096e21) +![ecs24 #center](./images/ecs24.png) Review everything and click on `create` Go to the ECS page, select Task Definitions and you should see the new task with a status of ACTIVE. -![ecs26 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/8e5435f9-1abc-433d-b58c-f64b5c6fe7bc) +![ecs38 #center](./images/ecs38.png) Select the task in the task definition list. Click `Deploy` and select `Run Task` -![ecs27 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/fe258c65-5809-4d04-9c89-9f8bfe568a90) +![ecs25 #center](./images/ecs25.png) Select your cluster from drop down menu of `Existing cluster`. In Networking section, select a virtual private cloud (VPC) from the list. If you are building a custom app this should be the VPC assigned to any other AWS services you will need to access from your application. For Nginx, any VPC works. Add at least one subnet. -Edit the security group. Because `Nginx` runs on port 80 by default, and port 80 is open for the container, you also need to open port 80 in the security group. +Edit the security group. Because Nginx runs on port 80 by default, and port 80 is open for the container, you also need to open port 80 in the security group. Select `Create a new security group` and enter a Security group name and security group description and add a Custom TCP inbound rule that opens port 80. @@ -260,10 +260,10 @@ Auto-assign public IP should be set to ENABLED. Click on `Create` -![1 #center](https://user-images.githubusercontent.com/87687468/235882089-9d7064d5-d2e2-44f6-99fa-1a94947ca246.JPG) +![ecs26 #center](./images/ecs26.jpeg) -![image #center](https://user-images.githubusercontent.com/87687468/236178142-dd2d264d-4f5f-44aa-90c9-87f9601acac4.png) +![ecs27 #center](./images/ecs27.png) With everything set up, run the task by clicking `Create` in the lower right corner. @@ -271,19 +271,19 @@ With everything set up, run the task by clicking `Create` in the lower right cor After you run the task, you will be forwarded to the Fargate-cluster page. -When the `Last status`` of your cluster changes to `RUNNING`, your app is up and running. +When the `Last status` of your cluster changes to `RUNNING`, your app is up and running. You may have to refresh the table a couple of times before the status is `RUNNING` -![ecs30 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/fd34b03f-46ff-4db5-b26a-43dc7324800f) +![ecs28 #center](./images/ecs28.png) Click on the link in the Task column and find the Public IP address in the `Configuration` section of the Task page. -![ecs31 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/053c0f13-ee8c-4903-9832-a601014ddaa6) +![ecs29 #center](./images/ecs29.png) Enter the public IP address in your browser to see your app running. -![ecs32 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/25457add-25bc-4c6d-9c2d-cd2fefebcfe2) +![ecs30 #center](./images/ecs30.png) ## Shut down the app @@ -291,10 +291,10 @@ When you are done, you’ll want to shut down your Nginx application to avoid ch From the ECS page select `Clusters` from the left menu and select your cluster from the list of clusters. -![ecs33 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/c578a377-bcd6-4934-8eff-5cfb839fca1a) +![ecs31 #center](./images/ecs31.png) From the table at the bottom of the page select `Tasks`. Check the box next to the running task and select `Stop` from the dropdown menu at the top of the table. -![ecs34 #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/5c48811b-35a8-4ee0-85b1-03ba946ea04d) +![ecs32 #center](./images/ecs32.png) diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs1.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs1.png new file mode 100644 index 000000000..b130d4a41 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs10.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs10.png new file mode 100644 index 000000000..4172811ba Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs10.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs11.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs11.png new file mode 100644 index 000000000..ea1a8573c Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs11.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs12.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs12.png new file mode 100644 index 000000000..99d4a35d8 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs12.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs13.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs13.png new file mode 100644 index 000000000..9f2b608b7 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs13.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs14.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs14.png new file mode 100644 index 000000000..d748a76a4 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs14.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs15.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs15.png new file mode 100644 index 000000000..58fe3831a Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs15.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs16.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs16.png new file mode 100644 index 000000000..d37edc4db Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs16.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs17.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs17.png new file mode 100644 index 000000000..7ba3e50cb Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs17.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs18.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs18.png new file mode 100644 index 000000000..e340191e6 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs18.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs19.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs19.png new file mode 100644 index 000000000..deb33a19f Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs19.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs2.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs2.png new file mode 100644 index 000000000..1dc8e9ba4 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs20.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs20.png new file mode 100644 index 000000000..8de998910 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs20.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs21.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs21.png new file mode 100644 index 000000000..51cab7a16 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs21.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs22.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs22.png new file mode 100644 index 000000000..deeea4164 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs22.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs23.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs23.png new file mode 100644 index 000000000..ff6a9ff5f Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs23.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs24.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs24.png new file mode 100644 index 000000000..fbcf0ea5b Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs24.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs25.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs25.png new file mode 100644 index 000000000..32718601b Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs25.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs26.jpeg b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs26.jpeg new file mode 100644 index 000000000..d555eb651 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs26.jpeg differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs27.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs27.png new file mode 100644 index 000000000..07e706006 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs27.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs28.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs28.png new file mode 100644 index 000000000..bb96d254a Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs28.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs29.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs29.png new file mode 100644 index 000000000..9ccdea552 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs29.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs3.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs3.png new file mode 100644 index 000000000..2f5daa1b9 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs3.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs30.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs30.png new file mode 100644 index 000000000..b3b1928e4 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs30.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs31.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs31.png new file mode 100644 index 000000000..45c46e8cc Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs31.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs32.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs32.png new file mode 100644 index 000000000..5e4f175e3 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs32.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs33.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs33.png new file mode 100644 index 000000000..b69b7b2aa Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs33.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs34.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs34.png new file mode 100644 index 000000000..8b4f744c6 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs34.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs35.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs35.png new file mode 100644 index 000000000..3f6243d91 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs35.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs36.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs36.png new file mode 100644 index 000000000..718520467 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs36.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs37.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs37.png new file mode 100644 index 000000000..7bfead8a0 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs37.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs38.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs38.png new file mode 100644 index 000000000..776220fc7 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs38.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs4.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs4.png new file mode 100644 index 000000000..961c62cfe Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs4.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs5.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs5.png new file mode 100644 index 000000000..da12563db Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs5.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs6.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs6.png new file mode 100644 index 000000000..ba2436c46 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs6.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs7.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs7.png new file mode 100644 index 000000000..ace67783f Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs7.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs8.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs8.png new file mode 100644 index 000000000..50f57bcd3 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs8.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs9.png b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs9.png new file mode 100644 index 000000000..3a6291aac Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/ecs/images/ecs9.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/ecs/terraform.md b/content/learning-paths/servers-and-cloud-computing/ecs/terraform.md index d15110318..98edfc46c 100644 --- a/content/learning-paths/servers-and-cloud-computing/ecs/terraform.md +++ b/content/learning-paths/servers-and-cloud-computing/ecs/terraform.md @@ -132,7 +132,7 @@ Apply complete! Resources: 1 added, 0 changed, 0 destroyed. Terraform has created the repository in ECR. You can confirm this on your Amazon Elastic Container Registry Repositories list. -![image #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/7c31127b-ca5e-438c-9888-3cf2ae3b2c83) +![ecs33 #center](./images/ecs33.png) Push the container image to the new repository using `docker push` as in the previous section. @@ -142,7 +142,7 @@ docker push [your account number].dkr.ecr.us-east-2.amazonaws.com/myapp Refresh the repository’s page to verify you’ve successfully pushed the image to the AWS ECR repository. -![image #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/a5908779-39a3-4729-a680-f472d166598e) +![ecs34 #center](./images/ecs34.png) ## Create an ECS Cluster @@ -171,7 +171,7 @@ terraform apply Navigate to Amazon ECS Clusters and verify that you can see the changes: -![image #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/784dcd60-109d-41e4-9a75-1141dee2743e) +![ecs35 #center](./images/ecs35.png) ## Configure an AWS ECS task @@ -262,7 +262,7 @@ terraform apply Navigate to Amazon ECS Task Definitions and you can see the task definitions: -![image #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/6734dd1d-1c8d-41a7-9c4c-02970ed0717e) +![ecs36 #center](./images/ecs36.png) ## Launch the Container @@ -416,11 +416,11 @@ resource "aws_security_group" "service_security_group" { } ``` -Add an output configuration to `main.tf`` that will extract the load balancer URL value from the state file and print it to the terminal. +Add an output configuration to `main.tf` that will extract the load balancer URL value from the state file and print it to the terminal. ```console # main.tf -#Log the load balancer app URL +# Log the load balancer app URL output "app_url" { value = aws_alb.application_load_balancer.dns_name } @@ -511,7 +511,7 @@ Copy the URL to your browser. You will see NGINX running: -![image #center](https://github.com/ArmDeveloperEcosystem/arm-learning-paths/assets/71631645/52271e11-a078-4c52-8462-cd89cc1fd973) +![ecs37 #center](./images/ecs37.png) {{% notice Note %}} If you see a `503 Service Temporarily Unavailable` immediately after running the `terraform apply` command you should wait a few seconds for all infrastructure to be created and try again. diff --git a/content/learning-paths/servers-and-cloud-computing/eks/_index.md b/content/learning-paths/servers-and-cloud-computing/eks/_index.md index 7a1f08718..2eee60fc5 100644 --- a/content/learning-paths/servers-and-cloud-computing/eks/_index.md +++ b/content/learning-paths/servers-and-cloud-computing/eks/_index.md @@ -1,6 +1,5 @@ --- title: "Deploy WordPress with MySQL on Elastic Kubernetes Service (EKS)" -draft: false minutes_to_complete: 60 who_is_this_for: > diff --git a/content/learning-paths/servers-and-cloud-computing/profiling-for-neoverse/optimization_checklist.md b/content/learning-paths/servers-and-cloud-computing/profiling-for-neoverse/optimization_checklist.md index 4d75b6ab8..6386ec71d 100644 --- a/content/learning-paths/servers-and-cloud-computing/profiling-for-neoverse/optimization_checklist.md +++ b/content/learning-paths/servers-and-cloud-computing/profiling-for-neoverse/optimization_checklist.md @@ -16,6 +16,7 @@ Here is a suggested optimization checklist: 1. Check the compiler did a good job. Disassemble your most significant functions and verify that the generated code looks efficient. 1. Check the functions that are the most frontend bound: + * If you see high instruction cache miss rate, apply profile-guided optimization to reduce the code size of less important functions. This frees up more instruction cache space for the important hot-functions. * If you see high instruction TLB misses, apply code layout optimization, using tools such as [Bolt](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bolt/overview/). This improves locality of code accesses, reducing the number of TLB misses. diff --git a/content/learning-paths/servers-and-cloud-computing/ran/armral.md b/content/learning-paths/servers-and-cloud-computing/ran/armral.md index 73d67f22a..c2c2c1144 100644 --- a/content/learning-paths/servers-and-cloud-computing/ran/armral.md +++ b/content/learning-paths/servers-and-cloud-computing/ran/armral.md @@ -133,14 +133,19 @@ The output will be similar to: ```output ... -56/56 Test #56: tail_biting_convolutional_decoding ...***Exception: Illegal 0.05 sec -2% tests passed, 55 tests failed out of 56 +61/64 Test #61: ldpc_awgn ............................ Passed 255.05 sec + Start 62: modulation_awgn +62/64 Test #62: modulation_awgn ...................... Passed 28.39 sec + Start 63: polar_awgn +63/64 Test #63: polar_awgn ........................... Passed 390.17 sec + Start 64: turbo_awgn +64/64 Test #64: turbo_awgn ........................... Passed 190.39 sec -Total Test time (real) = 2.80 sec +100% tests passed, 0 tests failed out of 64 -The following tests FAILED: - 1 - fft_cf32 (ILLEGAL) +Total Test time (real) = 1095.82 sec +[100%] Built target check ... ``` diff --git a/content/learning-paths/smartphones-and-mobile/_index.md b/content/learning-paths/smartphones-and-mobile/_index.md index 835244956..5a567ed56 100644 --- a/content/learning-paths/smartphones-and-mobile/_index.md +++ b/content/learning-paths/smartphones-and-mobile/_index.md @@ -12,21 +12,22 @@ maintopic: true operatingsystems_filter: - Android: 18 - Linux: 12 -- macOS: 3 -- Windows: 2 +- macOS: 4 +- Windows: 4 subjects_filter: - Gaming: 6 -- Graphics: 1 -- ML: 2 +- Graphics: 2 +- ML: 3 - Performance and Architecture: 19 subtitle: Optimize Android apps and build faster games using cutting-edge Arm tech title: Smartphones and Mobile tools_software_languages_filter: - 7-Zip: 1 - adb: 1 +- Android: 2 - Android NDK: 1 - Android SDK: 1 -- Android Studio: 2 +- Android Studio: 4 - Arm Development Studio: 1 - Arm Mobile Studio: 1 - Arm Performance Studio: 2 @@ -39,8 +40,8 @@ tools_software_languages_filter: - Fixed Virtual Platform: 1 - Frame Advisor: 1 - GCC: 8 -- GoogleTest: 1 -- Java: 2 +- Java: 3 +- Kotlin: 2 - MediaPipe: 1 - Memory Bug Report: 1 - Mobile: 4 diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/01.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/01.png new file mode 100644 index 000000000..7838a8d8e Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/01.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/02.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/02.png new file mode 100644 index 000000000..69568a16c Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/02.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/03.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/03.png new file mode 100644 index 000000000..4f961d3b4 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/03.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/04.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/04.png new file mode 100644 index 000000000..5f5d16ccf Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/04.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/05.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/05.png new file mode 100644 index 000000000..72f0173f4 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/05.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/06.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/06.png new file mode 100644 index 000000000..be03fd7d4 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/06.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/07.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/07.png new file mode 100644 index 000000000..9ca9892d8 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/07.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/08.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/08.png new file mode 100644 index 000000000..431312243 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/08.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/09.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/09.png new file mode 100644 index 000000000..1794be897 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/09.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/10.png b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/10.png new file mode 100644 index 000000000..5bb605162 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/10.png differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/11.jpg b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/11.jpg new file mode 100644 index 000000000..4b408f65e Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/11.jpg differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/12.jpg b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/12.jpg new file mode 100644 index 000000000..a23826286 Binary files /dev/null and b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/Figures/12.jpg differ diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_index.md b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_index.md new file mode 100644 index 000000000..303c24314 --- /dev/null +++ b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_index.md @@ -0,0 +1,37 @@ +--- +title: Create Computer Vision Applications with OpenCV on Android Devices + +minutes_to_complete: 30 + +who_is_this_for: This is an introductory topic for developers who are interested in creating Computer Vision Applications with OpenCV on Android Devices. + +learning_objectives: + - Describe what OpenCV is, and what it can offer. + - Create and configure a project to add OpenCV support. + - Process camera images using OpenCV. + +prerequisites: + - A development machine with [Android Studio](https://developer.android.com/studio) installed. + - An Android smartphone. + +author_primary: Dawid Borycki + +### Tags +skilllevels: Introductory +subjects: Graphics +armips: + - Cortex-A +operatingsystems: + - Windows +tools_software_languages: + - Android + - Android Studio + - Kotlin + - Java + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_next-steps.md b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_next-steps.md new file mode 100644 index 000000000..7d4d16077 --- /dev/null +++ b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_next-steps.md @@ -0,0 +1,39 @@ +--- +# ================================================================================ +# Edit +# ================================================================================ + +next_step_guidance: > + You have learned how to use OpenCV in your Android project. You can now learn how to use OpenCV to detect faces. +# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended. + +recommended_path: "/learning-paths/smartphones-and-mobile/android_opencv_facedetection/" +# Link to the next learning path being recommended(For example this could be /learning-paths/servers-and-cloud-computing/mongodb). + + +# further_reading links to references related to this path. Can be: + # Manuals for a tool / software mentioned (type: documentation) + # Blog about related topics (type: blog) + # General online references (type: website) + +further_reading: + - resource: + title: OpenCV + link: https://opencv.org + type: documentation + - resource: + title: OpenCV on Android + link: https://opencv.org/android/ + type: documentation + - resource: + title: Enhanced OpenCV For Android Support & ARM Performance Gains + link: https://opencv.org/blog/enhanced-opencv-for-android-support-arm-performance-gains/ + type: blog + +# ================================================================================ +# FIXED, DO NOT MODIFY +# ================================================================================ +weight: 21 # set to always be larger than the content in this path, and one more than 'review' +title: "Next Steps" # Always the same +layout: "learningpathall" # All files under learning paths have this same wrapper +--- diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_review.md b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_review.md new file mode 100644 index 000000000..ea5b50151 --- /dev/null +++ b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/_review.md @@ -0,0 +1,52 @@ +--- +# ================================================================================ +# Edit +# ================================================================================ + +# Always 3 questions. Should try to test the reader's knowledge, and reinforce the key points you want them to remember. + # question: A one sentence question + # answers: The correct answers (from 2-4 answer options only). Should be surrounded by quotes. + # correct_answer: An integer indicating what answer is correct (index starts from 0) + # explanation: A short (1-3 sentence) explanation of why the correct answer is correct. Can add additional context if desired + + +review: + - questions: + question: > + What is OpenCVLoader used for? + answers: + - "To compile OpenCV on Android." + - "To load the OpenCV library." + correct_answer: 2 + explanation: > + OpenCVLoader is used to load the OpenCV library. + + - questions: + question: > + What do you do to prepare the image acquired with OpenCV before display? + answers: + - "Detect the device’s current orientation and apply the necessary rotation to ensure the camera preview appears correctly oriented." + - "Configure the app manifest." + - "Configure the device." + correct_answer: 1 + explanation: > + To properly display the image from the camera, you need to detect the device’s current orientation and apply the necessary rotation to ensure the camera preview appears correctly oriented. + + - questions: + question: > + Can the thresholding of OpenCV be applied to RGB images? + answers: + answers: + - "Yes." + - "No." + correct_answer: 2 + explanation: > + Before you can apply thresholding, you need to convert the color image to grayscale using the Imgproc.cvtColor OpenCV function. + +# ================================================================================ +# FIXED, DO NOT MODIFY +# ================================================================================ +title: "Review" # Always the same title +weight: 20 # Set to always be larger than the content in this path +layout: "learningpathall" # All files under learning paths have this same wrapper +--- diff --git a/content/learning-paths/smartphones-and-mobile/android_opencv_camera/add-camera.md b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/add-camera.md new file mode 100644 index 000000000..08fbb56ed --- /dev/null +++ b/content/learning-paths/smartphones-and-mobile/android_opencv_camera/add-camera.md @@ -0,0 +1,461 @@ +--- +# User change +title: "Get camera images using OpenCV" + +weight: 4 + +layout: "learningpathall" +--- +You will now extend the application by adding camera support using OpenCV. Start by adding additional controls that will be used to start and stop the camera preview, and to display images from the camera. + +Additionally, you will add a checkbox control that will enable or disable real-time processing. For the real-time processing, you will use [adaptive thresholding](https://docs.opencv.org/4.x/d7/d4d/tutorial_py_thresholding.html) from OpenCV. + +## Modify the application view +To modify the application view, open `activity_main.xml` and replace the file contents with the following code: + +```XML + + + + + + +