openc3-cosmos-tool-docs 6.0.2 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/tools/staticdocs/404.html +1 -1
  3. data/tools/staticdocs/assets/css/{styles.839a3ee9.css → styles.1de6b959.css} +1 -1
  4. data/tools/staticdocs/assets/images/arrayplot-ab4963f7ad4eb1d7ecc646065dd43b4816a06367fa5e07d58b8cf520deff931e.png +0 -0
  5. data/tools/staticdocs/assets/images/limitscolor-32147ddf199a0f1cb68aae5992356bbd745074821e5244d913494a4ad0b638f5.png +0 -0
  6. data/tools/staticdocs/assets/js/{26b8abb2.a9f9025d.js → 26b8abb2.7f8d4cb0.js} +1 -1
  7. data/tools/staticdocs/assets/js/{5205.07e5caf3.js → 5205.c6f31e57.js} +1 -1
  8. data/tools/staticdocs/assets/js/{5e3ed378.cc5e2748.js → 5e3ed378.8b51f7c0.js} +1 -1
  9. data/tools/staticdocs/assets/js/5fe211ef.63b46202.js +1 -0
  10. data/tools/staticdocs/assets/js/6831b732.0a867cbc.js +1 -0
  11. data/tools/staticdocs/assets/js/72c6d8a8.b6fcfc30.js +1 -0
  12. data/tools/staticdocs/assets/js/9424f0b3.96e6dac4.js +1 -0
  13. data/tools/staticdocs/assets/js/{97535711.88c7444a.js → 97535711.78660098.js} +1 -1
  14. data/tools/staticdocs/assets/js/9d6e81d0.44e2d544.js +1 -0
  15. data/tools/staticdocs/assets/js/a677c089.18f98b70.js +1 -0
  16. data/tools/staticdocs/assets/js/aa6b6c1b.08f58887.js +1 -0
  17. data/tools/staticdocs/assets/js/c24eae19.aaae7796.js +1 -0
  18. data/tools/staticdocs/assets/js/{ebec1ccb.120a5b80.js → ebec1ccb.f938ebaa.js} +1 -1
  19. data/tools/staticdocs/assets/js/main.fd11211a.js +36 -0
  20. data/tools/staticdocs/assets/js/{runtime~main.91337aca.js → runtime~main.e660d304.js} +1 -1
  21. data/tools/staticdocs/docs/configuration/accessors.html +1 -1
  22. data/tools/staticdocs/docs/configuration/command.html +11 -1
  23. data/tools/staticdocs/docs/configuration/format.html +1 -1
  24. data/tools/staticdocs/docs/configuration/interfaces.html +16 -4
  25. data/tools/staticdocs/docs/configuration/plugins.html +7 -3
  26. data/tools/staticdocs/docs/configuration/protocols.html +1 -1
  27. data/tools/staticdocs/docs/configuration/ssl-tls.html +1 -1
  28. data/tools/staticdocs/docs/configuration/table.html +11 -1
  29. data/tools/staticdocs/docs/configuration/target.html +1 -1
  30. data/tools/staticdocs/docs/configuration/telemetry-screens.html +63 -28
  31. data/tools/staticdocs/docs/configuration/telemetry.html +1 -1
  32. data/tools/staticdocs/docs/configuration.html +1 -1
  33. data/tools/staticdocs/docs/development/curl.html +1 -1
  34. data/tools/staticdocs/docs/development/developing.html +6 -6
  35. data/tools/staticdocs/docs/development/json-api.html +1 -1
  36. data/tools/staticdocs/docs/development/log-structure.html +1 -1
  37. data/tools/staticdocs/docs/development/roadmap.html +1 -1
  38. data/tools/staticdocs/docs/development/streaming-api.html +1 -1
  39. data/tools/staticdocs/docs/development/testing.html +2 -2
  40. data/tools/staticdocs/docs/development.html +1 -1
  41. data/tools/staticdocs/docs/getting-started/generators.html +1 -1
  42. data/tools/staticdocs/docs/getting-started/gettingstarted.html +1 -1
  43. data/tools/staticdocs/docs/getting-started/installation.html +1 -1
  44. data/tools/staticdocs/docs/getting-started/key_concepts.html +2 -2
  45. data/tools/staticdocs/docs/getting-started/podman.html +1 -1
  46. data/tools/staticdocs/docs/getting-started/requirements.html +1 -1
  47. data/tools/staticdocs/docs/getting-started/upgrading.html +1 -1
  48. data/tools/staticdocs/docs/getting-started.html +1 -1
  49. data/tools/staticdocs/docs/guides/bridges.html +1 -1
  50. data/tools/staticdocs/docs/guides/cfs.html +1 -1
  51. data/tools/staticdocs/docs/guides/custom-widgets.html +1 -1
  52. data/tools/staticdocs/docs/guides/exposing_microservices.html +1 -1
  53. data/tools/staticdocs/docs/guides/little-endian-bitfields.html +1 -1
  54. data/tools/staticdocs/docs/guides/local-mode.html +1 -1
  55. data/tools/staticdocs/docs/guides/logging.html +1 -1
  56. data/tools/staticdocs/docs/guides/monitoring.html +1 -1
  57. data/tools/staticdocs/docs/guides/performance.html +1 -1
  58. data/tools/staticdocs/docs/guides/raspberrypi.html +1 -1
  59. data/tools/staticdocs/docs/guides/script-writing.html +1 -1
  60. data/tools/staticdocs/docs/guides/scripting-api.html +502 -125
  61. data/tools/staticdocs/docs/guides.html +1 -1
  62. data/tools/staticdocs/docs/meta/contributing.html +1 -1
  63. data/tools/staticdocs/docs/meta/licenses.html +1 -1
  64. data/tools/staticdocs/docs/meta/philosophy.html +1 -1
  65. data/tools/staticdocs/docs/meta/xtce.html +1 -1
  66. data/tools/staticdocs/docs/meta.html +1 -1
  67. data/tools/staticdocs/docs/privacy.html +1 -1
  68. data/tools/staticdocs/docs/tools/admin.html +1 -1
  69. data/tools/staticdocs/docs/tools/autonomic.html +1 -1
  70. data/tools/staticdocs/docs/tools/bucket-explorer.html +1 -1
  71. data/tools/staticdocs/docs/tools/calendar.html +1 -1
  72. data/tools/staticdocs/docs/tools/cmd-sender.html +1 -1
  73. data/tools/staticdocs/docs/tools/cmd-tlm-server.html +1 -1
  74. data/tools/staticdocs/docs/tools/command_history.html +1 -1
  75. data/tools/staticdocs/docs/tools/data-extractor.html +1 -1
  76. data/tools/staticdocs/docs/tools/data-viewer.html +1 -1
  77. data/tools/staticdocs/docs/tools/handbooks.html +1 -1
  78. data/tools/staticdocs/docs/tools/limits-monitor.html +1 -1
  79. data/tools/staticdocs/docs/tools/packet-viewer.html +1 -1
  80. data/tools/staticdocs/docs/tools/script-runner.html +1 -1
  81. data/tools/staticdocs/docs/tools/table-manager.html +1 -1
  82. data/tools/staticdocs/docs/tools/tlm-grapher.html +1 -1
  83. data/tools/staticdocs/docs/tools/tlm-viewer.html +1 -1
  84. data/tools/staticdocs/docs/tools.html +1 -1
  85. data/tools/staticdocs/docs.html +1 -1
  86. data/tools/staticdocs/img/telemetry_viewer/widgets/arrayplot.png +0 -0
  87. data/tools/staticdocs/img/telemetry_viewer/widgets/limitscolor.png +0 -0
  88. data/tools/staticdocs/index.html +1 -1
  89. data/tools/staticdocs/lunr-index-1740870259469.json +1 -0
  90. data/tools/staticdocs/lunr-index.json +1 -1
  91. data/tools/staticdocs/markdown-page.html +1 -1
  92. data/tools/staticdocs/search-doc-1740870259469.json +1 -0
  93. data/tools/staticdocs/search-doc.json +1 -1
  94. metadata +23 -21
  95. data/tools/staticdocs/assets/images/limitscolor-7f8e24e4f27f476c3b4c57393ab797268b86aa8ad8b6e7b83d72dd5bf3ca7952.png +0 -0
  96. data/tools/staticdocs/assets/js/5fe211ef.5a6390e4.js +0 -1
  97. data/tools/staticdocs/assets/js/6831b732.bb38c0d0.js +0 -1
  98. data/tools/staticdocs/assets/js/72c6d8a8.10f0f9ec.js +0 -1
  99. data/tools/staticdocs/assets/js/9424f0b3.bc60f3d9.js +0 -1
  100. data/tools/staticdocs/assets/js/9d6e81d0.141ccd61.js +0 -1
  101. data/tools/staticdocs/assets/js/a677c089.7caa32f6.js +0 -1
  102. data/tools/staticdocs/assets/js/aa6b6c1b.72eac29d.js +0 -1
  103. data/tools/staticdocs/assets/js/c24eae19.89738127.js +0 -1
  104. data/tools/staticdocs/assets/js/main.ed84fc7e.js +0 -36
  105. data/tools/staticdocs/lunr-index-1736455916496.json +0 -1
  106. data/tools/staticdocs/search-doc-1736455916496.json +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["7306"],{5077:function(e,n,o){o.r(n),o.d(n,{default:()=>p,frontMatter:()=>c,metadata:()=>s,assets:()=>l,toc:()=>a,contentTitle:()=>r});var s=JSON.parse('{"id":"development/developing","title":"Developing COSMOS","description":"Building COSMOS and developing the frontend and backend","source":"@site/docs/development/developing.md","sourceDirName":"development","slug":"/development/developing","permalink":"/tools/staticdocs/docs/development/developing","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/development/developing.md","tags":[],"version":"current","frontMatter":{"title":"Developing COSMOS","description":"Building COSMOS and developing the frontend and backend","sidebar_custom_props":{"myEmoji":"\uD83D\uDCBB"}},"sidebar":"defaultSidebar","previous":{"title":"Testing with Curl","permalink":"/tools/staticdocs/docs/development/curl"},"next":{"title":"JSON API","permalink":"/tools/staticdocs/docs/development/json-api"}}'),t=o("2322"),i=o("2840");let c={title:"Developing COSMOS",description:"Building COSMOS and developing the frontend and backend",sidebar_custom_props:{myEmoji:"\uD83D\uDCBB"}},r="Developing COSMOS",l={},a=[{value:"Development Tools",id:"development-tools",level:2},{value:"Running a Frontend Application",id:"running-a-frontend-application",level:2},{value:"Running a Backend Server",id:"running-a-backend-server",level:2}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"developing-cosmos",children:"Developing COSMOS"})}),"\n",(0,t.jsxs)(n.p,{children:["So you want to help develop COSMOS? All of our open source COSMOS code is on ",(0,t.jsx)(n.a,{href:"https://github.com/",children:"Github"})," so the first thing to do is get an ",(0,t.jsx)(n.a,{href:"https://github.com/join",children:"account"}),". Next ",(0,t.jsx)(n.a,{href:"https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository",children:"clone"})," the ",(0,t.jsx)(n.a,{href:"https://github.com/openc3/cosmos",children:"COSMOS"})," repository. We accept contributions from others as ",(0,t.jsx)(n.a,{href:"https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests",children:"Pull Requests"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"development-tools",children:"Development Tools"}),"\n",(0,t.jsxs)(n.p,{children:["The core COSMOS team develops with the ",(0,t.jsx)(n.a,{href:"https://code.visualstudio.com/",children:"Visual Studio Code"})," editor and we highly recommend it. We also utilize a number of extensions including docker, kubernetes, gitlens, prettier, eslint, python, vetur, and ruby. We commit our ",(0,t.jsx)(n.code,{children:"openc3.code-workspace"})," configuration for VSCode to help configure these plugins. You also need ",(0,t.jsx)(n.a,{href:"https://www.docker.com/products/docker-desktop",children:"Docker Desktop"})," which you should already have as it is a requirement to run COSMOS. You'll also need ",(0,t.jsx)(n.a,{href:"https://nodejs.org/en/download/",children:"NodeJS"})," and ",(0,t.jsx)(n.a,{href:"https://yarnpkg.com/getting-started/install",children:"yarn"})," installed."]}),"\n",(0,t.jsx)(n.h1,{id:"building-cosmos",children:"Building COSMOS"}),"\n",(0,t.jsx)(n.p,{children:"Note: We primarily develop COSMOS in MacOS so the commands here will reference bash scripts but the same files exist in Windows as batch scripts."}),"\n",(0,t.jsxs)(n.p,{children:["Build COSMOS using the ",(0,t.jsx)(n.code,{children:"openc3.sh"})," script:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"% ./openc3.sh build\n"})}),"\n",(0,t.jsx)(n.p,{children:"This will pull all the COSMOS container dependencies and build our local containers. Note: This can take a long time especially for your first build!"}),"\n",(0,t.jsx)(n.p,{children:"Once the build completes you can see the built images with the following command:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'% docker image ls | grep "openc3"\nopenc3inc/openc3-cosmos-init latest 4cac7a3ea9d3 29 hours ago 446MB\nopenc3inc/openc3-cosmos-script-runner-api latest 4aacbaf49f7a 29 hours ago 431MB\nopenc3inc/openc3-cosmos-cmd-tlm-api latest 9a8806bd4be3 3 days ago 432MB\nopenc3inc/openc3-operator latest 223e98129fe9 3 days ago 405MB\nopenc3inc/openc3-base latest 98df5c0378c2 3 days ago 405MB\nopenc3inc/openc3-redis latest 5a3003a49199 8 days ago 111MB\nopenc3inc/openc3-traefik latest ec13a8d16a2f 8 days ago 104MB\nopenc3inc/openc3-minio latest 787f6e3fc0be 8 days ago 238MB\nopenc3inc/openc3-node latest b3ee86d3620a 8 days ago 372MB\nopenc3inc/openc3-ruby latest aa158bbb9539 8 days ago 326MB\n'})}),"\n",(0,t.jsxs)(n.admonition,{title:"Offline Building",type:"info",children:[(0,t.jsxs)(n.p,{children:["If you're building in a offline environment or want to use a private Rubygems, NPM or APK server (e.g. Nexus), you can update the following environment variables: RUBYGEMS_URL, NPM_URL, APK_URL, and more in the ",(0,t.jsx)(n.a,{href:"https://github.com/openc3/cosmos/blob/main/.env",children:".env"})," file. Example values:"]}),(0,t.jsxs)(n.p,{children:["ALPINE_VERSION=3.19",(0,t.jsx)("br",{}),"\nALPINE_BUILD=7",(0,t.jsx)("br",{}),"\nRUBYGEMS_URL=",(0,t.jsx)(n.a,{href:"https://rubygems.org",children:"https://rubygems.org"}),(0,t.jsx)("br",{}),"\nNPM_URL=",(0,t.jsx)(n.a,{href:"https://registry.npmjs.org",children:"https://registry.npmjs.org"}),(0,t.jsx)("br",{}),"\nAPK_URL=",(0,t.jsx)(n.a,{href:"http://dl-cdn.alpinelinux.org",children:"http://dl-cdn.alpinelinux.org"}),(0,t.jsx)("br",{})]})]}),"\n",(0,t.jsx)(n.h1,{id:"running-cosmos",children:"Running COSMOS"}),"\n",(0,t.jsxs)(n.p,{children:["Running COSMOS in development mode enables localhost access to internal API ports as well as sets ",(0,t.jsx)(n.code,{children:"RAILS_ENV=development"})," in the cmd-tlm-api and script-runner-api Rails servers. To run in development mode:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"% ./openc3.sh run\n"})}),"\n",(0,t.jsx)(n.p,{children:"You can now see the running containers (I removed CONTAINER ID, CREATED and STATUS to save space):"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'% docker ps\nIMAGE COMMAND PORTS NAMES\nopenc3/openc3-cmd-tlm-api:latest "/sbin/tini -- rails\u2026" 127.0.0.1:2901->2901/tcp cosmos-openc3-cmd-tlm-api-1\nopenc3/openc3-script-runner-api:latest "/sbin/tini -- rails\u2026" 127.0.0.1:2902->2902/tcp cosmos-openc3-script-runner-api-1\nopenc3/openc3-traefik:latest "/entrypoint.sh trae\u2026" 0.0.0.0:2900->80/tcp cosmos-openc3-traefik-1\nopenc3/openc3-operator:latest "/sbin/tini -- ruby \u2026" cosmos-openc3-operator-1\nopenc3/openc3-minio:latest "/usr/bin/docker-ent\u2026" 127.0.0.1:9000->9000/tcp cosmos-openc3-minio-1\nopenc3/openc3-redis:latest "docker-entrypoint.s\u2026" 127.0.0.1:6379->6379/tcp cosmos-openc3-redis-1\n'})}),"\n",(0,t.jsx)(n.p,{children:"If you go to localhost:2900 you should see COSMOS up and running!"}),"\n",(0,t.jsx)(n.h2,{id:"running-a-frontend-application",children:"Running a Frontend Application"}),"\n",(0,t.jsx)(n.p,{children:"So now that you have COSMOS up and running how do you develop an individual COSMOS application?"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Bootstrap the frontend with yarn"}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"openc3-init/plugins % yarn\nopenc3-init/plugins % yarn build:common\n"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Serve a local COSMOS application (CmdTlmServer, ScriptRunner, etc)"}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"openc3-init % cd plugins/packages/openc3-tool-scriptrunner\nopenc3-tool-scriptrunner % yarn serve\nbuilt in 128722ms\n"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Set the ",(0,t.jsx)(n.a,{href:"https://single-spa.js.org/",children:"single SPA"})," override for the application"]}),"\n",(0,t.jsxs)(n.p,{children:["Visit localhost:2900 and Right-click 'Inspect'",(0,t.jsx)("br",{}),"\nIn the console paste:"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",children:'localStorage.setItem("devtools", true);\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Refresh and you should see ",(0,t.jsx)(n.code,{children:"{...}"})," in the bottom right",(0,t.jsx)("br",{}),"\nClick the Default button next to the application (@openc3/tool-scriptrunner)",(0,t.jsx)("br",{}),"\nPaste in the development path which is dependent on the port returned by the local yarn serve and the tool name (scriptrunner)"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{href:"http://localhost:2914/tools/scriptrunner/main.js",children:"http://localhost:2914/tools/scriptrunner/main.js"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Refresh the page and you should see your local copy of the application (Script Runner in this example). If you dynamically add code (like ",(0,t.jsx)(n.code,{children:"console.log"}),") the yarn window should re-compile and the browser should refresh displaying your new code. It is highly recommended to get familiar with your browser's ",(0,t.jsx)(n.a,{href:"https://developer.chrome.com/docs/devtools/overview/",children:"development tools"})," if you plan to do frontend development."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"running-a-backend-server",children:"Running a Backend Server"}),"\n",(0,t.jsx)(n.p,{children:"If the code you want to develop is the cmd-tlm-api or script-runner-api backend servers there are several steps to enable access to a development copy."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Run a development version of traefik. COSMOS uses traefik to direct API requests to the correct locations."}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"% cd openc3-traefik\nopenc3-traefik % docker ps\n# Look for the container with name including traefik\nopenc3-traefik % docker stop cosmos-openc3-traefik-1\nopenc3-traefik % docker build --build-arg TRAEFIK_CONFIG=traefik-dev.yaml -t openc3-traefik-dev .\nopenc3-traefik % docker run --network=openc3-cosmos-network -p 2900:2900 -it --rm openc3-traefik-dev\n"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Run a local copy of the cmd-tlm-api or script-runner-api"}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"% cd openc3-cosmos-cmd-tlm-api\nopenc3-cosmos-cmd-tlm-api % docker ps\n# Look for the container with name including cmd-tlm-api\nopenc3-cosmos-cmd-tlm-api % docker stop cosmos-openc3-cosmos-cmd-tlm-api-1\n# Run the following on Windows:\nopenc3-cosmos-cmd-tlm-api> dev_server.bat\n# In Linux, set all the environment variables in the .env file, but override REDIS to be local\nopenc3-cosmos-cmd-tlm-api % set -a; source ../.env; set +a\nopenc3-cosmos-cmd-tlm-api % export OPENC3_REDIS_HOSTNAME=127.0.0.1\nopenc3-cosmos-cmd-tlm-api % export OPENC3_REDIS_EPHEMERAL_HOSTNAME=127.0.0.1\nopenc3-cosmos-cmd-tlm-api % bundle install\nopenc3-cosmos-cmd-tlm-api % bundle exec rails s\n"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Once the ",(0,t.jsx)(n.code,{children:"bundle exec rails s"})," command returns you should see API requests coming from interactions in the frontend code. If you add code (like Ruby debugging statements) to the cmd-tlm-api code you need to stop the server (CTRL-C) and restart it to see the effect."]}),"\n"]})]})}function p(e={}){let{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},2840:function(e,n,o){o.d(n,{Z:function(){return r},a:function(){return c}});var s=o(2784);let t={},i=s.createContext(t);function c(e){let n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8713"],{1035:function(e,s,t){t.r(s),t.d(s,{default:()=>h,frontMatter:()=>i,metadata:()=>n,assets:()=>c,toc:()=>d,contentTitle:()=>a});var n=JSON.parse('{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","source":"@site/docs/getting-started/key_concepts.md","sourceDirName":"getting-started","slug":"/getting-started/key_concepts","permalink":"/tools/staticdocs/docs/getting-started/key_concepts","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/key_concepts.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"sidebar_position":5,"title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","sidebar_custom_props":{"myEmoji":"\uD83D\uDCA1"}},"sidebar":"defaultSidebar","previous":{"title":"Upgrading","permalink":"/tools/staticdocs/docs/getting-started/upgrading"},"next":{"title":"Requirements and Design","permalink":"/tools/staticdocs/docs/getting-started/requirements"}}'),o=t("2322"),r=t("2840");let i={sidebar_position:5,title:"Key Concepts",description:"Projects, Containerization, Frontend, Backend",sidebar_custom_props:{myEmoji:"\uD83D\uDCA1"}},a="OpenC3 COSMOS Key Concepts",c={},d=[{value:"Projects",id:"projects",level:2},{value:"Containerization",id:"containerization",level:2},{value:"Images",id:"images",level:3},{value:"Containers",id:"containers",level:3},{value:"Docker Compose",id:"docker-compose",level:3},{value:"Environment File",id:"environment-file",level:3},{value:"Kubernetes",id:"kubernetes",level:3},{value:"Frontend",id:"frontend",level:2},{value:"Vue.js",id:"vuejs",level:3},{value:"Single-Spa",id:"single-spa",level:3},{value:"Astro UX",id:"astro-ux",level:3},{value:"Backend",id:"backend",level:2},{value:"Redis",id:"redis",level:3},{value:"MinIO",id:"minio",level:3},{value:"Ruby on Rails",id:"ruby-on-rails",level:3}];function l(e){let s={a:"a",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"openc3-cosmos-key-concepts",children:"OpenC3 COSMOS Key Concepts"})}),"\n",(0,o.jsx)(s.h2,{id:"projects",children:"Projects"}),"\n",(0,o.jsxs)(s.p,{children:["The main COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos",children:"repo"})," contains all the source code used to build and run COSMOS. However, users (not developers) of COSMOS should use the COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project",children:"project"})," to launch COSMOS. The project consists of the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.sh",children:"openc3.sh"})," and ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.bat",children:"openc3.bat"})," files for starting and stopping COSMOS, the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," for configuring the COSMOS containers, and the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file for setting runtime variables. Additionally, the COSMOS project contains user modifiable config files for both Redis and Traefik."]}),"\n",(0,o.jsx)(s.h2,{id:"containerization",children:"Containerization"}),"\n",(0,o.jsx)(s.h3,{id:"images",children:"Images"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/get-started/overview/#images",children:"Docker"}),', "An image is a read-only template with instructions for creating a Docker container." The base operating system COSMOS uses is called ',(0,o.jsx)(s.a,{href:"https://www.alpinelinux.org/",children:"Alpine Linux"}),". It is a simple and compact image with a full package system that allows us to install our dependencies. Starting with Alpine, we create a ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/engine/reference/builder/",children:"Dockerfile"})," to add Ruby and Python and a few other packages to create our own docker image. We further build upon that image to create a NodeJS image to support our frontend and additional images to support our backend."]}),"\n",(0,o.jsx)(s.h3,{id:"containers",children:"Containers"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.docker.com/resources/what-container/",children:"Docker"}),', "a container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another." Also per ',(0,o.jsx)(s.a,{href:"https://docs.docker.com/guides/walkthroughs/what-is-a-container/",children:"Docker"}),', "A container is an isolated environment for your code. This means that a container has no knowledge of your operating system, or your files. It runs on the environment provided to you by Docker Desktop. Containers have everything that your code needs in order to run, down to a base operating system." COSMOS utilizes containers to provide a consistent runtime environment. Containers make it easy to deploy to local on-prem servers, cloud environments, or air-gapped networks.']}),"\n",(0,o.jsx)(s.p,{children:"The COSMOS Open Source containers consist of the following:"}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-init-1"}),(0,o.jsx)(s.td,{children:"Copies files to Minio and configures COSMOS then exits"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-operator-1"}),(0,o.jsx)(s.td,{children:"Main COSMOS container that runs the interfaces and target microservices"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-cmd-tlm-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides all the COSMOS API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-script-runner-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides the Script API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-1"}),(0,o.jsx)(s.td,{children:"Serves the static target configuration"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-ephemeral-1"}),(0,o.jsxs)(s.td,{children:["Serves the ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams",children:"streams"})," containing the raw and decomutated data"]})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-minio-1"}),(0,o.jsx)(s.td,{children:"Provides a S3 like bucket storage interface and also serves as a static webserver for the tool files"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-traefik-1"}),(0,o.jsx)(s.td,{children:"Provides a reverse proxy and load balancer with routes to the COSMOS endpoints"})]})]})]}),"\n",(0,o.jsxs)(s.p,{children:["The container list for ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"Enterprise COSMOS"})," consists of the following:"]}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-metrics-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides metrics on COSMOS performance"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-keycloak-1"}),(0,o.jsx)(s.td,{children:"Single-Sign On service for authentication"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-postgresql-1"}),(0,o.jsx)(s.td,{children:"SQL Database for use by Keycloak"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"openc3-nfs *"}),(0,o.jsx)(s.td,{children:"Network File System pod only for use in Kubernetes to share code libraries between containers"})]})]})]}),"\n",(0,o.jsx)(s.h3,{id:"docker-compose",children:"Docker Compose"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/",children:"Docker"}),', "Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application\'s services. Then, with a single command, you create and start all the services from your configuration." OpenC3 uses compose files to both build and run COSMOS. The ',(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," is where ports are exposed and environment variables are used."]}),"\n",(0,o.jsx)(s.h3,{id:"environment-file",children:"Environment File"}),"\n",(0,o.jsxs)(s.p,{children:["COSMOS uses an ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/environment-variables/env-file/",children:"environment file"})," along with Docker Compose to pass environment variables into the COSMOS runtime. This ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file consists of simple key value pairs that contain the version of COSMOS deployed, usernames and passwords, and much more."]}),"\n",(0,o.jsx)(s.h3,{id:"kubernetes",children:"Kubernetes"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://kubernetes.io/",children:"Kubernetes.io"}),', "Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery." ',(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides ",(0,o.jsx)(s.a,{href:"https://helm.sh/docs/topics/charts/",children:"Helm charts"})," for easy deployment to Kubernetes in various cloud environments."]}),"\n",(0,o.jsxs)(s.p,{children:["COSMOS Enterprise also provides ",(0,o.jsx)(s.a,{href:"https://www.terraform.io/",children:"Terraform"})," scripts to deploy COSMOS infrastructure on various cloud environments."]}),"\n",(0,o.jsx)(s.h2,{id:"frontend",children:"Frontend"}),"\n",(0,o.jsx)(s.h3,{id:"vuejs",children:"Vue.js"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS frontend is fully browser native and is implemented in the Vue.js framework. Per ",(0,o.jsx)(s.a,{href:"https://vuejs.org/guide/introduction.html",children:"Vue.js"}),', "Vue is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be they simple or complex." COSMOS utilizes Vue.js and the ',(0,o.jsx)(s.a,{href:"https://vuetifyjs.com/en/",children:"Vuetify"})," Component Framework UI library to build all the COSMOS tools which run in the browser of your choice. COSMOS 5 utilized Vue.js 2.x and Vuetify 2.x while COSMOS 6 utilizes Vue.js 3.x and Vuetify 3.x."]}),"\n",(0,o.jsx)(s.h3,{id:"single-spa",children:"Single-Spa"}),"\n",(0,o.jsxs)(s.p,{children:["While COSMOS itself is written in Vue.js, we utilize a technology called ",(0,o.jsx)(s.a,{href:"https://single-spa.js.org/",children:"single-spa"})," to allow COSMOS developers to create applications in any javascript framework they choose. Single-spa is a micro frontend framework and acts as a top level router to render the application being requested. COSMOS provides sample applications ready to plug into single-spa in Angular, React, Svelte, and Vue."]}),"\n",(0,o.jsx)(s.h3,{id:"astro-ux",children:"Astro UX"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/",children:"AstroUXDS"}),', "The Astro Space UX Design System enables developers and designers to build rich space app experiences with established interaction patterns and best practices." COSMOS utilizes the Astro design guidelines for color, typograpy, and iconograpy. In some cases, e.g. ',(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/components/clock/",children:"Astro Clock"}),", COSMOS directly incorporates Astro components."]}),"\n",(0,o.jsx)(s.h2,{id:"backend",children:"Backend"}),"\n",(0,o.jsx)(s.h3,{id:"redis",children:"Redis"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://redis.io/",children:"Redis"})," is an in-memory data store with support for strings, hashes, lists, sets, sorted sets, streams, and more. COSMOS uses Redis to store both our configuration and data. If you look back at our ",(0,o.jsx)(s.a,{href:"/docs/getting-started/key_concepts#containers",children:"container list"})," you'll notice two redis containers: cosmos-openc3-redis-1 and cosmos-openc3-redis-ephemeral-1. The ephemeral container contains all the real-time data pushed into ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams/",children:"Redis streams"}),". The other redis container contains COSMOS configuration that is meant to persist. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides helm charts that setup ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/management/scaling/",children:"Redis Cluster"})," to perform horizontal scaling where data is shared across multiple Redis nodes."]}),"\n",(0,o.jsx)(s.h3,{id:"minio",children:"MinIO"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://min.io/",children:"MinIO"})," is a high-performance, S3 compatible object store. COSMOS uses this storage technology to host both the COSMOS tools themselves and the long term log files. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," deployed in a cloud environment uses the available cloud native bucket storage technology, e.g. AWS S3, GCP Buckets, and Azure Blob Storage. Using bucket storage allows COSMOS to directly serve the tools as a static website and thus we don't need to deploy Tomcat or Nginx for example."]}),"\n",(0,o.jsx)(s.h3,{id:"ruby-on-rails",children:"Ruby on Rails"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS API and Script Runner backends are powered by ",(0,o.jsx)(s.a,{href:"https://rubyonrails.org/",children:"Ruby on Rails"}),". Rails is a web application development framework written in the Ruby programming language. Rails (and our familiarity with Ruby) allows us to write less code while accomplishing more than many other languages and frameworks."]})]})}function h(e={}){let{wrapper:s}={...(0,r.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},2840:function(e,s,t){t.d(s,{Z:function(){return a},a:function(){return i}});var n=t(2784);let o={},r=n.createContext(o);function i(e){let s=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:s},e.children)}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8713"],{1035:function(e,s,t){t.r(s),t.d(s,{default:()=>h,frontMatter:()=>i,metadata:()=>n,assets:()=>c,toc:()=>d,contentTitle:()=>a});var n=JSON.parse('{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","source":"@site/docs/getting-started/key_concepts.md","sourceDirName":"getting-started","slug":"/getting-started/key_concepts","permalink":"/tools/staticdocs/docs/getting-started/key_concepts","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/key_concepts.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"sidebar_position":5,"title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","sidebar_custom_props":{"myEmoji":"\uD83D\uDCA1"}},"sidebar":"defaultSidebar","previous":{"title":"Upgrading","permalink":"/tools/staticdocs/docs/getting-started/upgrading"},"next":{"title":"Requirements and Design","permalink":"/tools/staticdocs/docs/getting-started/requirements"}}'),o=t("2322"),r=t("2840");let i={sidebar_position:5,title:"Key Concepts",description:"Projects, Containerization, Frontend, Backend",sidebar_custom_props:{myEmoji:"\uD83D\uDCA1"}},a="OpenC3 COSMOS Key Concepts",c={},d=[{value:"Projects",id:"projects",level:2},{value:"Containerization",id:"containerization",level:2},{value:"Images",id:"images",level:3},{value:"Containers",id:"containers",level:3},{value:"Docker Compose",id:"docker-compose",level:3},{value:"Environment File",id:"environment-file",level:3},{value:"Kubernetes",id:"kubernetes",level:3},{value:"Frontend",id:"frontend",level:2},{value:"Vue.js",id:"vuejs",level:3},{value:"Single-Spa",id:"single-spa",level:3},{value:"Astro UX",id:"astro-ux",level:3},{value:"Backend",id:"backend",level:2},{value:"Redis",id:"redis",level:3},{value:"MinIO",id:"minio",level:3},{value:"Ruby on Rails",id:"ruby-on-rails",level:3}];function l(e){let s={a:"a",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"openc3-cosmos-key-concepts",children:"OpenC3 COSMOS Key Concepts"})}),"\n",(0,o.jsx)(s.h2,{id:"projects",children:"Projects"}),"\n",(0,o.jsxs)(s.p,{children:["The main COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos",children:"repo"})," contains all the source code used to build and run COSMOS. However, users (not developers) of COSMOS should use the COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project",children:"project"})," to launch COSMOS. The project consists of the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.sh",children:"openc3.sh"})," and ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.bat",children:"openc3.bat"})," files for starting and stopping COSMOS, the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," for configuring the COSMOS containers, and the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file for setting runtime variables. Additionally, the COSMOS project contains user modifiable config files for both Redis and Traefik."]}),"\n",(0,o.jsx)(s.h2,{id:"containerization",children:"Containerization"}),"\n",(0,o.jsx)(s.h3,{id:"images",children:"Images"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/get-started/overview/#images",children:"Docker"}),', "An image is a read-only template with instructions for creating a Docker container." The base operating system COSMOS uses is called ',(0,o.jsx)(s.a,{href:"https://www.alpinelinux.org/",children:"Alpine Linux"}),". It is a simple and compact image with a full package system that allows us to install our dependencies. Starting with Alpine, we create a ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/engine/reference/builder/",children:"Dockerfile"})," to add Ruby and Python and a few other packages to create our own docker image. We further build upon that image to create a NodeJS image to support our frontend and additional images to support our backend."]}),"\n",(0,o.jsx)(s.h3,{id:"containers",children:"Containers"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.docker.com/resources/what-container/",children:"Docker"}),', "a container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another." Also per ',(0,o.jsx)(s.a,{href:"https://docs.docker.com/guides/walkthroughs/what-is-a-container/",children:"Docker"}),', "A container is an isolated environment for your code. This means that a container has no knowledge of your operating system, or your files. It runs on the environment provided to you by Docker Desktop. Containers have everything that your code needs in order to run, down to a base operating system." COSMOS utilizes containers to provide a consistent runtime environment. Containers make it easy to deploy to local on-prem servers, cloud environments, or air-gapped networks.']}),"\n",(0,o.jsx)(s.p,{children:"The COSMOS Open Source containers consist of the following:"}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-init-1"}),(0,o.jsx)(s.td,{children:"Copies files to Minio and configures COSMOS then exits"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-operator-1"}),(0,o.jsx)(s.td,{children:"Main COSMOS container that runs the interfaces and target microservices"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-cmd-tlm-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides all the COSMOS API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-script-runner-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides the Script API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-1"}),(0,o.jsx)(s.td,{children:"Serves the static target configuration"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-ephemeral-1"}),(0,o.jsxs)(s.td,{children:["Serves the ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams",children:"streams"})," containing the raw and decomutated data"]})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-minio-1"}),(0,o.jsx)(s.td,{children:"Provides a S3 like bucket storage interface and also serves as a static webserver for the tool files"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-traefik-1"}),(0,o.jsx)(s.td,{children:"Provides a reverse proxy and load balancer with routes to the COSMOS endpoints"})]})]})]}),"\n",(0,o.jsxs)(s.p,{children:["The container list for ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"Enterprise COSMOS"})," consists of the following:"]}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-metrics-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides metrics on COSMOS performance"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-keycloak-1"}),(0,o.jsx)(s.td,{children:"Single-Sign On service for authentication"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-postgresql-1"}),(0,o.jsx)(s.td,{children:"SQL Database for use by Keycloak"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"openc3-nfs *"}),(0,o.jsx)(s.td,{children:"Network File System pod only for use in Kubernetes to share code libraries between containers"})]})]})]}),"\n",(0,o.jsx)(s.h3,{id:"docker-compose",children:"Docker Compose"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/",children:"Docker"}),', "Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application\'s services. Then, with a single command, you create and start all the services from your configuration." OpenC3 uses compose files to both build and run COSMOS. The ',(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," is where ports are exposed and environment variables are used."]}),"\n",(0,o.jsx)(s.h3,{id:"environment-file",children:"Environment File"}),"\n",(0,o.jsxs)(s.p,{children:["COSMOS uses an ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/environment-variables/env-file/",children:"environment file"})," along with Docker Compose to pass environment variables into the COSMOS runtime. This ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file consists of simple key value pairs that contain the version of COSMOS deployed, usernames and passwords, and much more."]}),"\n",(0,o.jsx)(s.h3,{id:"kubernetes",children:"Kubernetes"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://kubernetes.io/",children:"Kubernetes.io"}),', "Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery." ',(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides ",(0,o.jsx)(s.a,{href:"https://helm.sh/docs/topics/charts/",children:"Helm charts"})," for easy deployment to Kubernetes in various cloud environments."]}),"\n",(0,o.jsx)(s.p,{children:"COSMOS Enterprise also provides configuration to deploy COSMOS infrastructure on various cloud environments (e.g. CloudFormation template on AWS)."}),"\n",(0,o.jsx)(s.h2,{id:"frontend",children:"Frontend"}),"\n",(0,o.jsx)(s.h3,{id:"vuejs",children:"Vue.js"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS frontend is fully browser native and is implemented in the Vue.js framework. Per ",(0,o.jsx)(s.a,{href:"https://vuejs.org/guide/introduction.html",children:"Vue.js"}),', "Vue is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be they simple or complex." COSMOS utilizes Vue.js and the ',(0,o.jsx)(s.a,{href:"https://vuetifyjs.com/en/",children:"Vuetify"})," Component Framework UI library to build all the COSMOS tools which run in the browser of your choice. COSMOS 5 utilized Vue.js 2.x and Vuetify 2.x while COSMOS 6 utilizes Vue.js 3.x and Vuetify 3.x."]}),"\n",(0,o.jsx)(s.h3,{id:"single-spa",children:"Single-Spa"}),"\n",(0,o.jsxs)(s.p,{children:["While COSMOS itself is written in Vue.js, we utilize a technology called ",(0,o.jsx)(s.a,{href:"https://single-spa.js.org/",children:"single-spa"})," to allow COSMOS developers to create applications in any javascript framework they choose. Single-spa is a micro frontend framework and acts as a top level router to render the application being requested. COSMOS provides sample applications ready to plug into single-spa in Angular, React, Svelte, and Vue."]}),"\n",(0,o.jsx)(s.h3,{id:"astro-ux",children:"Astro UX"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/",children:"AstroUXDS"}),', "The Astro Space UX Design System enables developers and designers to build rich space app experiences with established interaction patterns and best practices." COSMOS utilizes the Astro design guidelines for color, typograpy, and iconograpy. In some cases, e.g. ',(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/components/clock/",children:"Astro Clock"}),", COSMOS directly incorporates Astro components."]}),"\n",(0,o.jsx)(s.h2,{id:"backend",children:"Backend"}),"\n",(0,o.jsx)(s.h3,{id:"redis",children:"Redis"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://redis.io/",children:"Redis"})," is an in-memory data store with support for strings, hashes, lists, sets, sorted sets, streams, and more. COSMOS uses Redis to store both our configuration and data. If you look back at our ",(0,o.jsx)(s.a,{href:"/docs/getting-started/key_concepts#containers",children:"container list"})," you'll notice two redis containers: cosmos-openc3-redis-1 and cosmos-openc3-redis-ephemeral-1. The ephemeral container contains all the real-time data pushed into ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams/",children:"Redis streams"}),". The other redis container contains COSMOS configuration that is meant to persist. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides helm charts that setup ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/management/scaling/",children:"Redis Cluster"})," to perform horizontal scaling where data is shared across multiple Redis nodes."]}),"\n",(0,o.jsx)(s.h3,{id:"minio",children:"MinIO"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://min.io/",children:"MinIO"})," is a high-performance, S3 compatible object store. COSMOS uses this storage technology to host both the COSMOS tools themselves and the long term log files. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," deployed in a cloud environment uses the available cloud native bucket storage technology, e.g. AWS S3, GCP Buckets, and Azure Blob Storage. Using bucket storage allows COSMOS to directly serve the tools as a static website and thus we don't need to deploy Tomcat or Nginx for example."]}),"\n",(0,o.jsx)(s.h3,{id:"ruby-on-rails",children:"Ruby on Rails"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS API and Script Runner backends are powered by ",(0,o.jsx)(s.a,{href:"https://rubyonrails.org/",children:"Ruby on Rails"}),". Rails is a web application development framework written in the Ruby programming language. Rails (and our familiarity with Ruby) allows us to write less code while accomplishing more than many other languages and frameworks."]})]})}function h(e={}){let{wrapper:s}={...(0,r.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},2840:function(e,s,t){t.d(s,{Z:function(){return a},a:function(){return i}});var n=t(2784);let o={},r=n.createContext(o);function i(e){let s=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:s},e.children)}}}]);