|
1 | | -== Solution patterns site template |
| 1 | +This solution pattern demonstrates how OpenShift Service Mesh 3 (in Technology preview) empowers platform teams to manage traffic flows with precision, including showcasing a canary deployment for safe, incremental rollouts. Additionally, it highlights how observability insights help detect and resolve issues quickly, ensuring reliability and resiliency across hybrid cloud environments. |
2 | 2 |
|
3 | | -This is a template used to generate new solution pattern pages with the same look and feel of the existing solution patterns and https://redhat-solution-patterns.github.io/[main page] . |
4 | | - |
5 | | -What's in this doc: |
6 | | - |
7 | | -* <<How to create a new solution pattern page>> |
8 | | -* <<Development Quickstart>> |
9 | | -** <<Clone and install the new project>> |
10 | | -** <<Run and preview the website>> |
11 | | -* <<How to add my new solution pattern to the main page menu>> |
12 | | -* <<Learn more>> |
13 | | -
|
14 | | -=== How to create a new solution pattern page |
15 | | - |
16 | | -To create a new solution pattern page: |
17 | | - |
18 | | -. Access to https://github.com/redhat-solution-patterns/courseware-template; |
19 | | -. Click on the `Use this template` green button; |
20 | | -. Type the name of your new sp, e.g. "solution-pattern-xy-z". |
21 | | -* It's recommended that you are the owner of the repository during the initial phases of development; |
22 | | -. Click on the `Create repository from template` green button |
23 | | -You should have a new repository with the required files and configurations to get started with content development. |
24 | | - |
25 | | -=== Development Quickstart |
26 | | - |
27 | | -This section offers a basic tutorial to teach you how to set up the generated project, and preview it locally. A more comprehensive can be found in the documentation at docs.antora.org. |
28 | | - |
29 | | -[#prereqs] |
30 | | -==== Prerequisites |
31 | | -To preview and bundle the default UI, you need the following software on your computer: |
32 | | - |
33 | | -* git (command: git) |
34 | | -* Node.js (commands: node and npm) |
35 | | -* Gulp CLI (command: gulp) |
36 | | - |
37 | | -===== Node.js |
38 | | - |
39 | | -In this guide, we'll be installing Node.js 10. |
40 | | - |
41 | | -While you can install Node.js from the official packages, we strongly recommend that you use {url-nvm}[nvm] (Node Version Manager) to manage your Node.js installation(s). |
42 | | -Follow the {url-nvm-install}[nvm installation instructions] to set up nvm on your machine. |
43 | | - |
44 | | -Once you've installed nvm, open a new terminal and install Node.js 10 using the following command: |
45 | | - |
46 | | - $ nvm install 10 |
47 | | - |
48 | | -You can switch to this version of Node.js at any time using the following command: |
49 | | - |
50 | | - $ nvm use 10 |
51 | | - |
52 | | -To make Node.js 10 the default in new terminals, type: |
53 | | - |
54 | | - $ nvm alias default 10 |
55 | | - |
56 | | -Now that you have Node.js installed, you can proceed with installing the Gulp CLI. |
57 | | - |
58 | | -===== Gulp CLI |
59 | | - |
60 | | -You'll need the Gulp command-line interface (CLI) to run the build. |
61 | | -The Gulp CLI package provides the `gulp` command which, in turn, executes the version of Gulp declared by the project. |
62 | | - |
63 | | -You should install the Gulp CLI globally (which resolves to a location in your user directory if you're using nvm) using the following command: |
64 | | - |
65 | | - $ npm install -g gulp-cli |
66 | | - |
67 | | -Verify the Gulp CLI is installed and on your PATH by running: |
68 | | - |
69 | | - $ gulp --version |
70 | | - |
71 | | -Now that you have the prerequisites installed, you can fetch and build the UI project. |
72 | | - |
73 | | -=== Clone and install the new project |
74 | | - |
75 | | -1. Clone the generated project using git. |
76 | | -2. Use npm to install the project's dependencies inside the project. |
77 | | -In your terminal, execute the following command: |
78 | | - |
79 | | - $ npm install |
80 | | - |
81 | | -=== Run and preview the website |
82 | | - |
83 | | -To build and preview the project in a local web server, run: |
84 | | - |
85 | | - $ npx gulp |
86 | | - |
87 | | -You'll see a URL listed in the output of this command: |
88 | | - |
89 | | -.... |
90 | | -[16:49:17] Requiring external module @babel/register |
91 | | -[16:49:18] Using gulpfile ~/your/project/directory/gulpfile.babel.js |
92 | | -[16:49:18] Starting 'default'... |
93 | | -[16:49:18] Starting 'removeSite'... |
94 | | -[16:49:18] Finished 'removeSite' after 20 ms |
95 | | -[16:49:18] Starting 'removeCache'... |
96 | | -[16:49:18] Finished 'removeCache' after 1.7 ms |
97 | | -[16:49:18] Starting 'build'... |
98 | | -[16:49:20] Finished 'build' after 2.75 s |
99 | | -[16:49:20] Starting 'serve'... |
100 | | -[16:49:20] Finished 'serve' after 8.75 ms |
101 | | -[16:49:20] Starting 'siteWatch'... |
102 | | -[Browsersync] Access URLs: |
103 | | - -------------------------------------- |
104 | | - Local: http://localhost:3000 |
105 | | - External: http://192.168.0.114:3000 |
106 | | - -------------------------------------- |
107 | | - UI: http://localhost:3001 |
108 | | - UI External: http://localhost:3001 |
109 | | - -------------------------------------- |
110 | | -[Browsersync] Serving files from: ./gh-pages |
111 | | -.... |
112 | | - |
113 | | -Navigate to this URL to preview the site locally. |
114 | | - |
115 | | -While this command is running, any changes you make to the source files will be instantly reflected in the browser. |
116 | | - |
117 | | -Press `[Ctrl+C]` to stop the preview server and end the continuous build. |
118 | | - |
119 | | -=== How to add my new solution pattern to the main page menu |
120 | | - |
121 | | -To have your solution pattern listed in the top menu, please open a new issue in |
122 | | -https://github.com/redhat-solution-patterns/course-ui/issues[this project: https://github.com/redhat-solution-patterns/course-ui/issues]. |
123 | | - |
124 | | -Make sure to inform: |
125 | | - |
126 | | -* Short title |
127 | | -* Main category (if appropriate). e.g. "Application modernization", "Edge", etc. |
128 | | - |
129 | | -=== Learn more |
130 | | - |
131 | | -This template is based on the Red Hat Developers scholars courseware template. To learn more, check the build courseware https://redhat-scholars.github.io/build-course[documentation] on how folder structure, how to use macros and other gotchas. |
0 commit comments