diff --git a/404.html b/404.html index b90588b00..730362762 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | monitor - + diff --git a/CNAME b/CNAME deleted file mode 100644 index c43a286b6..000000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -docs.monitor.mogh.tech \ No newline at end of file diff --git a/assets/js/669fcf45.af82da26.js b/assets/js/669fcf45.af82da26.js deleted file mode 100644 index d30abb248..000000000 --- a/assets/js/669fcf45.af82da26.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocsite=self.webpackChunkdocsite||[]).push([[552],{7478:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var r=t(4848),s=t(8453);const o={},i="Sync Resources",l={id:"sync-resources",title:"Sync Resources",description:"Monitor is able to sync resources declared in TOML files by diffing them against the existing resources,",source:"@site/docs/sync-resources.md",sourceDirName:".",slug:"/sync-resources",permalink:"/docs/sync-resources",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/sync-resources.md",tags:[],version:"current",frontMatter:{},sidebar:"docs",previous:{title:"Container Management",permalink:"/docs/deploy-containers/lifetime-management"},next:{title:"Permissioning Resources",permalink:"/docs/permissioning"}},c={},a=[{value:"Example Declarations",id:"example-declarations",level:2},{value:"Server",id:"server",level:3},{value:"Builder and build",id:"builder-and-build",level:3},{value:"Deployments",id:"deployments",level:3},{value:"Procedure",id:"procedure",level:3},{value:"Repo",id:"repo",level:3},{value:"User Group:",id:"user-group",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"sync-resources",children:"Sync Resources"}),"\n",(0,r.jsxs)(n.p,{children:["Monitor is able to sync resources declared in TOML files by diffing them against the existing resources,\nand apply updates based on the diffs. Simply use a Github repo to manage the files and create a ",(0,r.jsx)(n.code,{children:"ResourceSync"})," pointing to the repo,\nand the core backend will poll for any updates (you can also manually trigger an update poll / execution in the UI)."]}),"\n",(0,r.jsxs)(n.p,{children:["File detection is additive and recursive, so you can spread out your resource declarations across any number of files\nand use any nesting of folders to organize resources inside a root folder. Additionally, you can create multiple ",(0,r.jsx)(n.code,{children:"ResourceSyncs"}),'\nand each sync will be handled independently. This allows different syncs to manage resources on a "per-project" basis.']}),"\n",(0,r.jsx)(n.p,{children:"The UI will display the computed sync actions and only execute them upon manual confirmation.\nOr the sync execution Github webhook may be configured on the Github repo to\nautomatically execute syncs upon pushes to the configured branch."}),"\n",(0,r.jsx)(n.h2,{id:"example-declarations",children:"Example Declarations"}),"\n",(0,r.jsx)(n.h3,{id:"server",children:"Server"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/server/struct.ServerConfig.html",children:"Server config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[server]] # Declare a new server\nname = "server-01"\ndescription = "the main mogh server"\ntags = ["monitor"]\nconfig.address = "http://localhost:8120"\nconfig.region = "AshburnDc1"\nconfig.enabled = true # default: false\n'})}),"\n",(0,r.jsx)(n.h3,{id:"builder-and-build",children:"Builder and build"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/builder/struct.BuilderConfig.html",children:"Builder config schema"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/build/struct.BuildConfig.html",children:"Build config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[builder]] # Declare a builder\nname = "builder-01"\ntags = []\nconfig.type = "Aws"\nconfig.params.region = "us-east-2"\nconfig.params.ami_id = "ami-0e9bd154667944680"\n# These things come from your specific setup\nconfig.params.subnet_id = "subnet-xxxxxxxxxxxxxxxxxx"\nconfig.params.key_pair_name = "xxxxxxxx"\nconfig.params.assign_public_ip = true\nconfig.params.use_public_ip = true\nconfig.params.security_group_ids = [\n "sg-xxxxxxxxxxxxxxxxxx",\n "sg-xxxxxxxxxxxxxxxxxx"\n]\n\n##\n\n[[build]]\nname = "test_logger"\ndescription = "Logs randomly at INFO, WARN, ERROR levels to test logging setups"\ntags = ["test"]\nconfig.builder_id = "builder-01"\nconfig.repo = "mbecker20/test_logger"\nconfig.branch = "master"\nconfig.github_account = "mbecker20"\nconfig.image_registry.type = "Ghcr"\nconfig.image_registry.params.account = "your_github_account"\n# Set docker labels\nconfig.labels = """\norg.opencontainers.image.source = https://github.com/mbecker20/test_logger\norg.opencontainers.image.description = Logs randomly at INFO, WARN, ERROR levels to test logging setups\norg.opencontainers.image.licenses = GPL-3.0"""\n'})}),"\n",(0,r.jsx)(n.h3,{id:"deployments",children:"Deployments"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/deployment/struct.DeploymentConfig.html",children:"Deployment config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[variable]] # Declare variables\nname = "OTLP_ENDPOINT"\nvalue = "http://localhost:4317"\n\n##\n\n[[deployment]] # Declare a deployment\nname = "test-logger-01"\ndescription = "test logger deployment 1"\ntags = ["test"]\n# sync will deploy the container: \n# - if it is not running.\n# - has relevant config updates.\n# - the attached build has new version.\ndeploy = true\nconfig.server_id = "server-01"\nconfig.image.type = "Build"\nconfig.image.params.build = "test_logger"\n# set the volumes / bind mounts\nconfig.volumes = """\n/data/logs = /etc/logs\n/data/config = /etc/config"""\n# Set the environment variables\nconfig.environment = """\nOTLP_ENDPOINT = [[OTLP_ENDPOINT]] # interpolate variables into the envs. (they also support comments using \'#\')\nVARIABLE_1 = value_1\nVARIABLE_2 = value_2"""\n# Set Docker labels\nconfig.labels = "deployment.type = logger"\n\n##\n\n[[deployment]]\nname = "test-logger-02"\ndescription = "test logger deployment 2"\ntags = ["test"]\ndeploy = true\n# Create a dependency on test-logger-01. This deployment will only be deployed after test-logger-01 is deployed.\n# Additionally, any sync deploy of test-logger-01 will also trigger sync deploy of this deployment.\nafter = ["test-logger-01"]\nconfig.server_id = "server-01"\nconfig.image.type = "Build"\nconfig.image.params.build = "test_logger"\nconfig.volumes = """\n/data/logs = /etc/logs\n/data/config = /etc/config"""\nconfig.environment = """\nVARIABLE_1 = value_1\nVARIABLE_2 = value_2"""\n# Set Docker labels\nconfig.labels = "deployment.type = logger"\n'})}),"\n",(0,r.jsx)(n.h3,{id:"procedure",children:"Procedure"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/procedure/struct.ProcedureConfig.html",children:"Procedure config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[procedure]]\nname = "test-procedure"\ndescription = "Do some things in a specific order"\ntags = ["test"]\n\n# Each stage will be executed one after the other (in sequence)\n[[procedure.config.stage]]\nname = "Build stuff"\nenabled = true\n# The executions within a stage will be run in parallel. The stage completes when all executions finish.\nexecutions = [\n { execution.type = "RunBuild", execution.params.build = "test_logger", enabled = true },\n { execution.type = "PullRepo", execution.params.repo = "monitor-periphery", enabled = true },\n]\n\n[[procedure.config.stage]]\nname = "Deploy test logger 1"\nenabled = true\nexecutions = [\n { execution.type = "Deploy", execution.params.deployment = "test-logger-01", enabled = true }\n]\n\n[[procedure.config.stage]]\nname = "Deploy test logger 2"\nenabled = true\nexecutions = [\n { execution.type = "Deploy", execution.params.deployment = "test-logger-02", enabled = true }\n]\n'})}),"\n",(0,r.jsx)(n.h3,{id:"repo",children:"Repo"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/repo/struct.RepoConfig.html",children:"Repo config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[repo]]\nname = "monitor-periphery"\ndescription = "Builds new versions of the periphery binary. Requires Rust installed on the host."\ntags = ["monitor"]\nconfig.server_id = "server-01"\nconfig.repo = "mbecker20/monitor"\n# Run an action after the repo is pulled\nconfig.on_pull.path = "."\nconfig.on_pull.command = "/root/.cargo/bin/cargo build -p monitor_periphery --release && cp ./target/release/periphery /root/periphery"\n'})}),"\n",(0,r.jsx)(n.h3,{id:"user-group",children:"User Group:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/toml/struct.UserGroupToml.html",children:"UserGroup schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[user_group]]\nname = "groupo"\nusers = ["mbecker20", "karamvirsingh98"]\n# Attach base level of Execute on all builds\nall.Build = "Execute"\nall.Alerter = "Write"\npermissions = [\n # Attach permissions to specific resources by name\n { target.type = "Repo", target.id = "monitor-periphery", level = "Execute" },\n # Attach permissions to many resources with name matching regex (this uses \'^(.+)-(.+)$\' as regex expression)\n { target.type = "Server", target.id = "\\\\^(.+)-(.+)$\\\\", level = "Read" },\n { target.type = "Deployment", target.id = "\\\\^immich\\\\", level = "Execute" },\n]\n'})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/669fcf45.d1351707.js b/assets/js/669fcf45.d1351707.js new file mode 100644 index 000000000..b71b06e2a --- /dev/null +++ b/assets/js/669fcf45.d1351707.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocsite=self.webpackChunkdocsite||[]).push([[552],{7478:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=t(4848),o=t(8453);const i={},s="Sync Resources",l={id:"sync-resources",title:"Sync Resources",description:"Monitor is able to sync resources declared in TOML files by diffing them against the existing resources,",source:"@site/docs/sync-resources.md",sourceDirName:".",slug:"/sync-resources",permalink:"/docs/sync-resources",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/sync-resources.md",tags:[],version:"current",frontMatter:{},sidebar:"docs",previous:{title:"Container Management",permalink:"/docs/deploy-containers/lifetime-management"},next:{title:"Permissioning Resources",permalink:"/docs/permissioning"}},a={},c=[{value:"Example Declarations",id:"example-declarations",level:2},{value:"Server",id:"server",level:3},{value:"Builder and build",id:"builder-and-build",level:3},{value:"Deployments",id:"deployments",level:3},{value:"Procedure",id:"procedure",level:3},{value:"Repo",id:"repo",level:3},{value:"User Group:",id:"user-group",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"sync-resources",children:"Sync Resources"}),"\n",(0,r.jsxs)(n.p,{children:["Monitor is able to sync resources declared in TOML files by diffing them against the existing resources,\nand apply updates based on the diffs. Push the files to a remote git repo and create a ",(0,r.jsx)(n.code,{children:"ResourceSync"})," pointing to the repo,\nand the core backend will poll for any updates (you can also manually trigger an update poll / execution in the UI)."]}),"\n",(0,r.jsxs)(n.p,{children:["File detection is additive and recursive, so you can spread out your resource declarations across any number of files\nand use any nesting of folders to organize resources inside a root folder. Additionally, you can create multiple ",(0,r.jsx)(n.code,{children:"ResourceSyncs"}),'\nand each sync will be handled independently. This allows different syncs to manage resources on a "per-project" basis.']}),"\n",(0,r.jsx)(n.p,{children:"The UI will display the computed sync actions and only execute them upon manual confirmation.\nOr the sync execution git webhook may be configured on the git repo to\nautomatically execute syncs upon pushes to the configured branch."}),"\n",(0,r.jsx)(n.h2,{id:"example-declarations",children:"Example Declarations"}),"\n",(0,r.jsx)(n.h3,{id:"server",children:"Server"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/server/struct.ServerConfig.html",children:"Server config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[server]] # Declare a new server\nname = "server-01"\ndescription = "the main mogh server"\ntags = ["monitor"]\nconfig.address = "http://localhost:8120"\nconfig.region = "AshburnDc1"\nconfig.enabled = true # default: false\n'})}),"\n",(0,r.jsx)(n.h3,{id:"builder-and-build",children:"Builder and build"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/builder/struct.BuilderConfig.html",children:"Builder config schema"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/build/struct.BuildConfig.html",children:"Build config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[builder]] # Declare a builder\nname = "builder-01"\ntags = []\nconfig.type = "Aws"\nconfig.params.region = "us-east-2"\nconfig.params.ami_id = "ami-0e9bd154667944680"\n# These things come from your specific setup\nconfig.params.subnet_id = "subnet-xxxxxxxxxxxxxxxxxx"\nconfig.params.key_pair_name = "xxxxxxxx"\nconfig.params.assign_public_ip = true\nconfig.params.use_public_ip = true\nconfig.params.security_group_ids = [\n "sg-xxxxxxxxxxxxxxxxxx",\n "sg-xxxxxxxxxxxxxxxxxx"\n]\n\n##\n\n[[build]]\nname = "test_logger"\ndescription = "Logs randomly at INFO, WARN, ERROR levels to test logging setups"\ntags = ["test"]\nconfig.builder_id = "builder-01"\nconfig.repo = "mbecker20/test_logger"\nconfig.branch = "master"\nconfig.git_account = "mbecker20"\nconfig.image_registry.type = "Standard"\nconfig.image_registry.params.domain = "github.com" # or your custom domain\nconfig.image_registry.params.account = "your_username"\nconfig.image_registry.params.organization = "your_organization" # optinoal\n# Set docker labels\nconfig.labels = """\norg.opencontainers.image.source = https://github.com/mbecker20/test_logger\norg.opencontainers.image.description = Logs randomly at INFO, WARN, ERROR levels to test logging setups\norg.opencontainers.image.licenses = GPL-3.0"""\n'})}),"\n",(0,r.jsx)(n.h3,{id:"deployments",children:"Deployments"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/deployment/struct.DeploymentConfig.html",children:"Deployment config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[variable]] # Declare variables\nname = "OTLP_ENDPOINT"\nvalue = "http://localhost:4317"\n\n##\n\n[[deployment]] # Declare a deployment\nname = "test-logger-01"\ndescription = "test logger deployment 1"\ntags = ["test"]\n# sync will deploy the container: \n# - if it is not running.\n# - has relevant config updates.\n# - the attached build has new version.\ndeploy = true\nconfig.server_id = "server-01"\nconfig.image.type = "Build"\nconfig.image.params.build = "test_logger"\n# set the volumes / bind mounts\nconfig.volumes = """\n/data/logs = /etc/logs\n/data/config = /etc/config"""\n# Set the environment variables\nconfig.environment = """\nOTLP_ENDPOINT = [[OTLP_ENDPOINT]] # interpolate variables into the envs. (they also support comments using \'#\')\nVARIABLE_1 = value_1\nVARIABLE_2 = value_2"""\n# Set Docker labels\nconfig.labels = "deployment.type = logger"\n\n##\n\n[[deployment]]\nname = "test-logger-02"\ndescription = "test logger deployment 2"\ntags = ["test"]\ndeploy = true\n# Create a dependency on test-logger-01. This deployment will only be deployed after test-logger-01 is deployed.\n# Additionally, any sync deploy of test-logger-01 will also trigger sync deploy of this deployment.\nafter = ["test-logger-01"]\nconfig.server_id = "server-01"\nconfig.image.type = "Build"\nconfig.image.params.build = "test_logger"\nconfig.volumes = """\n/data/logs = /etc/logs\n/data/config = /etc/config"""\nconfig.environment = """\nVARIABLE_1 = value_1\nVARIABLE_2 = value_2"""\n# Set Docker labels\nconfig.labels = "deployment.type = logger"\n'})}),"\n",(0,r.jsx)(n.h3,{id:"procedure",children:"Procedure"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/procedure/struct.ProcedureConfig.html",children:"Procedure config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[procedure]]\nname = "test-procedure"\ndescription = "Do some things in a specific order"\ntags = ["test"]\n\n# Each stage will be executed one after the other (in sequence)\n[[procedure.config.stage]]\nname = "Build stuff"\nenabled = true\n# The executions within a stage will be run in parallel. The stage completes when all executions finish.\nexecutions = [\n { execution.type = "RunBuild", execution.params.build = "test_logger", enabled = true },\n { execution.type = "PullRepo", execution.params.repo = "monitor-periphery", enabled = true },\n]\n\n[[procedure.config.stage]]\nname = "Deploy test logger 1"\nenabled = true\nexecutions = [\n { execution.type = "Deploy", execution.params.deployment = "test-logger-01", enabled = true }\n]\n\n[[procedure.config.stage]]\nname = "Deploy test logger 2"\nenabled = true\nexecutions = [\n { execution.type = "Deploy", execution.params.deployment = "test-logger-02", enabled = true }\n]\n'})}),"\n",(0,r.jsx)(n.h3,{id:"repo",children:"Repo"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/repo/struct.RepoConfig.html",children:"Repo config schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[repo]]\nname = "monitor-periphery"\ndescription = "Builds new versions of the periphery binary. Requires Rust installed on the host."\ntags = ["monitor"]\nconfig.server_id = "server-01"\nconfig.git_provider = "git.mogh.tech" # use an alternate git provider (default is github.com)\nconfig.git_account = "mbecker20"\nconfig.repo = "mbecker20/monitor"\n# Run an action after the repo is pulled\nconfig.on_pull.path = "."\nconfig.on_pull.command = "/root/.cargo/bin/cargo build -p monitor_periphery --release && cp ./target/release/periphery /root/periphery"\n'})}),"\n",(0,r.jsx)(n.h3,{id:"user-group",children:"User Group:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.rs/monitor_client/latest/monitor_client/entities/toml/struct.UserGroupToml.html",children:"UserGroup schema"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'[[user_group]]\nname = "groupo"\nusers = ["mbecker20", "karamvirsingh98"]\n# Attach base level of Execute on all builds\nall.Build = "Execute"\nall.Alerter = "Write"\npermissions = [\n # Attach permissions to specific resources by name\n { target.type = "Repo", target.id = "monitor-periphery", level = "Execute" },\n # Attach permissions to many resources with name matching regex (this uses \'^(.+)-(.+)$\' as regex expression)\n { target.type = "Server", target.id = "\\\\^(.+)-(.+)$\\\\", level = "Read" },\n { target.type = "Deployment", target.id = "\\\\^immich\\\\", level = "Execute" },\n]\n'})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>l});var r=t(6540);const o={},i=r.createContext(o);function s(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.8002b68e.js b/assets/js/runtime~main.bdc8f30f.js similarity index 55% rename from assets/js/runtime~main.8002b68e.js rename to assets/js/runtime~main.bdc8f30f.js index 87979ff15..3eb94395a 100644 --- a/assets/js/runtime~main.8002b68e.js +++ b/assets/js/runtime~main.bdc8f30f.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,t,r,c,o={},n={};function f(e){var a=n[e];if(void 0!==a)return a.exports;var t=n[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,f),t.loaded=!0,t.exports}f.m=o,f.c=n,e=[],f.O=(a,t,r,c)=>{if(!t){var o=1/0;for(b=0;b=c)&&Object.keys(f.O).every((e=>f.O[e](t[d])))?t.splice(d--,1):(n=!1,c0&&e[b-1][2]>c;b--)e[b]=e[b-1];e[b]=[t,r,c]},f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);f.r(c);var o={};a=a||[null,t({}),t([]),t(t)];for(var n=2&r&&e;"object"==typeof n&&!~a.indexOf(n);n=t(n))Object.getOwnPropertyNames(n).forEach((a=>o[a]=()=>e[a]));return o.default=()=>e,f.d(c,o),c},f.d=(e,a)=>{for(var t in a)f.o(a,t)&&!f.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((a,t)=>(f.f[t](e,a),a)),[])),f.u=e=>"assets/js/"+({48:"a94703ab",92:"3734296e",98:"a7bd4aaa",100:"ef1bbce5",235:"a7456010",247:"f8238c17",323:"74a07cac",383:"d59290e0",401:"17896441",512:"48402c64",531:"75245258",543:"c65a6c17",549:"a5a01e01",552:"669fcf45",583:"1df93b7f",624:"5fbc5cf1",647:"5e95c892",648:"a9cd8699",663:"6aab5236",742:"aba21aa0",802:"a5ce9ce8",846:"c54f4afd",848:"8b13a4b4",849:"0058b4c6",864:"d92a3c43",912:"c8c1187d",943:"79c522c5",976:"0e384e19",995:"ef526b88"}[e]||e)+"."+{48:"0a6b5f99",92:"876c6023",98:"6f58ed8b",100:"642e3763",235:"b82eb55b",237:"2f3e1c0f",247:"ace2f037",323:"ded43cc8",383:"21963aed",401:"ec55cfba",512:"3686dc11",531:"7f8ebf07",543:"a6710687",549:"1e625067",552:"af82da26",583:"da8619ec",624:"da5e7a86",647:"825bac72",648:"1d260df2",663:"fc1be06c",742:"e2256b29",802:"dc07e781",846:"fdb6f38b",848:"330a724f",849:"e044c338",864:"75d2c109",912:"b77f1fa8",943:"b18e36e0",976:"0b5b1b34",995:"e744ea91"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},c="docsite:",f.l=(e,a,t,o)=>{if(r[e])r[e].push(a);else{var n,d;if(void 0!==t)for(var i=document.getElementsByTagName("script"),b=0;b{n.onerror=n.onload=null,clearTimeout(s);var c=r[e];if(delete r[e],n.parentNode&&n.parentNode.removeChild(n),c&&c.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=l.bind(null,n.onerror),n.onload=l.bind(null,n.onload),d&&document.head.appendChild(n)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"401",75245258:"531",a94703ab:"48","3734296e":"92",a7bd4aaa:"98",ef1bbce5:"100",a7456010:"235",f8238c17:"247","74a07cac":"323",d59290e0:"383","48402c64":"512",c65a6c17:"543",a5a01e01:"549","669fcf45":"552","1df93b7f":"583","5fbc5cf1":"624","5e95c892":"647",a9cd8699:"648","6aab5236":"663",aba21aa0:"742",a5ce9ce8:"802",c54f4afd:"846","8b13a4b4":"848","0058b4c6":"849",d92a3c43:"864",c8c1187d:"912","79c522c5":"943","0e384e19":"976",ef526b88:"995"}[e]||e,f.p+f.u(e)},(()=>{var e={354:0,869:0};f.f.j=(a,t)=>{var r=f.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(354|869)$/.test(a))e[a]=0;else{var c=new Promise(((t,c)=>r=e[a]=[t,c]));t.push(r[2]=c);var o=f.p+f.u(a),n=new Error;f.l(o,(t=>{if(f.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var c=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;n.message="Loading chunk "+a+" failed.\n("+c+": "+o+")",n.name="ChunkLoadError",n.type=c,n.request=o,r[1](n)}}),"chunk-"+a,a)}},f.O.j=a=>0===e[a];var a=(a,t)=>{var r,c,o=t[0],n=t[1],d=t[2],i=0;if(o.some((a=>0!==e[a]))){for(r in n)f.o(n,r)&&(f.m[r]=n[r]);if(d)var b=d(f)}for(a&&a(t);i{"use strict";var e,a,t,r,c,o={},n={};function d(e){var a=n[e];if(void 0!==a)return a.exports;var t=n[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,d),t.loaded=!0,t.exports}d.m=o,d.c=n,e=[],d.O=(a,t,r,c)=>{if(!t){var o=1/0;for(b=0;b=c)&&Object.keys(d.O).every((e=>d.O[e](t[f])))?t.splice(f--,1):(n=!1,c0&&e[b-1][2]>c;b--)e[b]=e[b-1];e[b]=[t,r,c]},d.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return d.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);d.r(c);var o={};a=a||[null,t({}),t([]),t(t)];for(var n=2&r&&e;"object"==typeof n&&!~a.indexOf(n);n=t(n))Object.getOwnPropertyNames(n).forEach((a=>o[a]=()=>e[a]));return o.default=()=>e,d.d(c,o),c},d.d=(e,a)=>{for(var t in a)d.o(a,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((a,t)=>(d.f[t](e,a),a)),[])),d.u=e=>"assets/js/"+({48:"a94703ab",92:"3734296e",98:"a7bd4aaa",100:"ef1bbce5",235:"a7456010",247:"f8238c17",323:"74a07cac",383:"d59290e0",401:"17896441",512:"48402c64",531:"75245258",543:"c65a6c17",549:"a5a01e01",552:"669fcf45",583:"1df93b7f",624:"5fbc5cf1",647:"5e95c892",648:"a9cd8699",663:"6aab5236",742:"aba21aa0",802:"a5ce9ce8",846:"c54f4afd",848:"8b13a4b4",849:"0058b4c6",864:"d92a3c43",912:"c8c1187d",943:"79c522c5",976:"0e384e19",995:"ef526b88"}[e]||e)+"."+{48:"0a6b5f99",92:"876c6023",98:"6f58ed8b",100:"642e3763",235:"b82eb55b",237:"2f3e1c0f",247:"ace2f037",323:"ded43cc8",383:"21963aed",401:"ec55cfba",512:"3686dc11",531:"7f8ebf07",543:"a6710687",549:"1e625067",552:"d1351707",583:"da8619ec",624:"da5e7a86",647:"825bac72",648:"1d260df2",663:"fc1be06c",742:"e2256b29",802:"dc07e781",846:"fdb6f38b",848:"330a724f",849:"e044c338",864:"75d2c109",912:"b77f1fa8",943:"b18e36e0",976:"0b5b1b34",995:"e744ea91"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},c="docsite:",d.l=(e,a,t,o)=>{if(r[e])r[e].push(a);else{var n,f;if(void 0!==t)for(var i=document.getElementsByTagName("script"),b=0;b{n.onerror=n.onload=null,clearTimeout(s);var c=r[e];if(delete r[e],n.parentNode&&n.parentNode.removeChild(n),c&&c.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=l.bind(null,n.onerror),n.onload=l.bind(null,n.onload),f&&document.head.appendChild(n)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/",d.gca=function(e){return e={17896441:"401",75245258:"531",a94703ab:"48","3734296e":"92",a7bd4aaa:"98",ef1bbce5:"100",a7456010:"235",f8238c17:"247","74a07cac":"323",d59290e0:"383","48402c64":"512",c65a6c17:"543",a5a01e01:"549","669fcf45":"552","1df93b7f":"583","5fbc5cf1":"624","5e95c892":"647",a9cd8699:"648","6aab5236":"663",aba21aa0:"742",a5ce9ce8:"802",c54f4afd:"846","8b13a4b4":"848","0058b4c6":"849",d92a3c43:"864",c8c1187d:"912","79c522c5":"943","0e384e19":"976",ef526b88:"995"}[e]||e,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(a,t)=>{var r=d.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(354|869)$/.test(a))e[a]=0;else{var c=new Promise(((t,c)=>r=e[a]=[t,c]));t.push(r[2]=c);var o=d.p+d.u(a),n=new Error;d.l(o,(t=>{if(d.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var c=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;n.message="Loading chunk "+a+" failed.\n("+c+": "+o+")",n.name="ChunkLoadError",n.type=c,n.request=o,r[1](n)}}),"chunk-"+a,a)}},d.O.j=a=>0===e[a];var a=(a,t)=>{var r,c,o=t[0],n=t[1],f=t[2],i=0;if(o.some((a=>0!==e[a]))){for(r in n)d.o(n,r)&&(d.m[r]=n[r]);if(f)var b=f(d)}for(a&&a(t);i API | monitor - + diff --git a/docs/build-images.html b/docs/build-images.html index aa12b49c9..e1bff65ee 100644 --- a/docs/build-images.html +++ b/docs/build-images.html @@ -4,7 +4,7 @@ Building Images | monitor - + diff --git a/docs/build-images/builders.html b/docs/build-images/builders.html index f3e107d6b..106f14319 100644 --- a/docs/build-images/builders.html +++ b/docs/build-images/builders.html @@ -4,7 +4,7 @@ Builders | monitor - + diff --git a/docs/build-images/configuration.html b/docs/build-images/configuration.html index 5b900a58c..d0a1a1ced 100644 --- a/docs/build-images/configuration.html +++ b/docs/build-images/configuration.html @@ -4,7 +4,7 @@ Configuration | monitor - + diff --git a/docs/build-images/pre-build.html b/docs/build-images/pre-build.html index fc0f089b5..f7c1c3da2 100644 --- a/docs/build-images/pre-build.html +++ b/docs/build-images/pre-build.html @@ -4,7 +4,7 @@ Pre-build command | monitor - + diff --git a/docs/build-images/versioning.html b/docs/build-images/versioning.html index bb8d91fb8..3f7fbaa44 100644 --- a/docs/build-images/versioning.html +++ b/docs/build-images/versioning.html @@ -4,7 +4,7 @@ Versioning | monitor - + diff --git a/docs/connecting-servers.html b/docs/connecting-servers.html index cd5b08d37..56f4e49d4 100644 --- a/docs/connecting-servers.html +++ b/docs/connecting-servers.html @@ -4,7 +4,7 @@ Connecting Servers | monitor - + diff --git a/docs/connecting-servers/add-server.html b/docs/connecting-servers/add-server.html index cfdd66347..0d3cc3c14 100644 --- a/docs/connecting-servers/add-server.html +++ b/docs/connecting-servers/add-server.html @@ -4,7 +4,7 @@ Adding Servers to Monitor | monitor - + diff --git a/docs/connecting-servers/setup-periphery.html b/docs/connecting-servers/setup-periphery.html index 2df9cc5a3..7f5457f07 100644 --- a/docs/connecting-servers/setup-periphery.html +++ b/docs/connecting-servers/setup-periphery.html @@ -4,7 +4,7 @@ Setup Monitor Periphery | monitor - + diff --git a/docs/connecting-servers/templates.html b/docs/connecting-servers/templates.html index 12fa0e71d..62cf4290f 100644 --- a/docs/connecting-servers/templates.html +++ b/docs/connecting-servers/templates.html @@ -4,7 +4,7 @@ Cloud Templates | monitor - + diff --git a/docs/core-setup.html b/docs/core-setup.html index b48856c1c..22e7cbf19 100644 --- a/docs/core-setup.html +++ b/docs/core-setup.html @@ -4,7 +4,7 @@ Core Setup | monitor - + diff --git a/docs/deploy-containers.html b/docs/deploy-containers.html index 43a5a7037..939e41053 100644 --- a/docs/deploy-containers.html +++ b/docs/deploy-containers.html @@ -4,7 +4,7 @@ Deploy Containers | monitor - + diff --git a/docs/deploy-containers/configuration.html b/docs/deploy-containers/configuration.html index fba84b90a..4afa4d9dd 100644 --- a/docs/deploy-containers/configuration.html +++ b/docs/deploy-containers/configuration.html @@ -4,7 +4,7 @@ Configuration | monitor - + diff --git a/docs/deploy-containers/lifetime-management.html b/docs/deploy-containers/lifetime-management.html index 4dda70d43..802228d40 100644 --- a/docs/deploy-containers/lifetime-management.html +++ b/docs/deploy-containers/lifetime-management.html @@ -4,7 +4,7 @@ Container Management | monitor - + diff --git a/docs/file-paths.html b/docs/file-paths.html index b7d8184ce..572ec66ce 100644 --- a/docs/file-paths.html +++ b/docs/file-paths.html @@ -4,7 +4,7 @@ File Paths | monitor - + diff --git a/docs/intro.html b/docs/intro.html index 2c315ab32..3dcd021a2 100644 --- a/docs/intro.html +++ b/docs/intro.html @@ -4,7 +4,7 @@ What is Monitor? | monitor - + diff --git a/docs/permissioning.html b/docs/permissioning.html index 0bab16c74..712d8e002 100644 --- a/docs/permissioning.html +++ b/docs/permissioning.html @@ -4,7 +4,7 @@ Permissioning Resources | monitor - + diff --git a/docs/procedures.html b/docs/procedures.html index 8c6590e2e..7e5ad77fe 100644 --- a/docs/procedures.html +++ b/docs/procedures.html @@ -4,7 +4,7 @@ procedures | monitor - + diff --git a/docs/resources.html b/docs/resources.html index b8c646a25..eb23ed075 100644 --- a/docs/resources.html +++ b/docs/resources.html @@ -4,7 +4,7 @@ Resources | monitor - + diff --git a/docs/sync-resources.html b/docs/sync-resources.html index 8704c46d4..22407f883 100644 --- a/docs/sync-resources.html +++ b/docs/sync-resources.html @@ -4,19 +4,19 @@ Sync Resources | monitor - +

Sync Resources

Monitor is able to sync resources declared in TOML files by diffing them against the existing resources, -and apply updates based on the diffs. Simply use a Github repo to manage the files and create a ResourceSync pointing to the repo, +and apply updates based on the diffs. Push the files to a remote git repo and create a ResourceSync pointing to the repo, and the core backend will poll for any updates (you can also manually trigger an update poll / execution in the UI).

File detection is additive and recursive, so you can spread out your resource declarations across any number of files and use any nesting of folders to organize resources inside a root folder. Additionally, you can create multiple ResourceSyncs and each sync will be handled independently. This allows different syncs to manage resources on a "per-project" basis.

The UI will display the computed sync actions and only execute them upon manual confirmation. -Or the sync execution Github webhook may be configured on the Github repo to +Or the sync execution git webhook may be configured on the git repo to automatically execute syncs upon pushes to the configured branch.

Example Declarations

Server

@@ -29,7 +29,7 @@ automatically execute syncs upon pushes to the configured branch.

  • Builder config schema
  • Build config schema
  • -
    [[builder]] # Declare a builder
    name = "builder-01"
    tags = []
    config.type = "Aws"
    config.params.region = "us-east-2"
    config.params.ami_id = "ami-0e9bd154667944680"
    # These things come from your specific setup
    config.params.subnet_id = "subnet-xxxxxxxxxxxxxxxxxx"
    config.params.key_pair_name = "xxxxxxxx"
    config.params.assign_public_ip = true
    config.params.use_public_ip = true
    config.params.security_group_ids = [
    "sg-xxxxxxxxxxxxxxxxxx",
    "sg-xxxxxxxxxxxxxxxxxx"
    ]

    ##

    [[build]]
    name = "test_logger"
    description = "Logs randomly at INFO, WARN, ERROR levels to test logging setups"
    tags = ["test"]
    config.builder_id = "builder-01"
    config.repo = "mbecker20/test_logger"
    config.branch = "master"
    config.github_account = "mbecker20"
    config.image_registry.type = "Ghcr"
    config.image_registry.params.account = "your_github_account"
    # Set docker labels
    config.labels = """
    org.opencontainers.image.source = https://github.com/mbecker20/test_logger
    org.opencontainers.image.description = Logs randomly at INFO, WARN, ERROR levels to test logging setups
    org.opencontainers.image.licenses = GPL-3.0"""
    +
    [[builder]] # Declare a builder
    name = "builder-01"
    tags = []
    config.type = "Aws"
    config.params.region = "us-east-2"
    config.params.ami_id = "ami-0e9bd154667944680"
    # These things come from your specific setup
    config.params.subnet_id = "subnet-xxxxxxxxxxxxxxxxxx"
    config.params.key_pair_name = "xxxxxxxx"
    config.params.assign_public_ip = true
    config.params.use_public_ip = true
    config.params.security_group_ids = [
    "sg-xxxxxxxxxxxxxxxxxx",
    "sg-xxxxxxxxxxxxxxxxxx"
    ]

    ##

    [[build]]
    name = "test_logger"
    description = "Logs randomly at INFO, WARN, ERROR levels to test logging setups"
    tags = ["test"]
    config.builder_id = "builder-01"
    config.repo = "mbecker20/test_logger"
    config.branch = "master"
    config.git_account = "mbecker20"
    config.image_registry.type = "Standard"
    config.image_registry.params.domain = "github.com" # or your custom domain
    config.image_registry.params.account = "your_username"
    config.image_registry.params.organization = "your_organization" # optinoal
    # Set docker labels
    config.labels = """
    org.opencontainers.image.source = https://github.com/mbecker20/test_logger
    org.opencontainers.image.description = Logs randomly at INFO, WARN, ERROR levels to test logging setups
    org.opencontainers.image.licenses = GPL-3.0"""

    Deployments

    • Deployment config schema
    • @@ -44,7 +44,7 @@ automatically execute syncs upon pushes to the configured branch.

      -
      [[repo]]
      name = "monitor-periphery"
      description = "Builds new versions of the periphery binary. Requires Rust installed on the host."
      tags = ["monitor"]
      config.server_id = "server-01"
      config.repo = "mbecker20/monitor"
      # Run an action after the repo is pulled
      config.on_pull.path = "."
      config.on_pull.command = "/root/.cargo/bin/cargo build -p monitor_periphery --release && cp ./target/release/periphery /root/periphery"
      +
      [[repo]]
      name = "monitor-periphery"
      description = "Builds new versions of the periphery binary. Requires Rust installed on the host."
      tags = ["monitor"]
      config.server_id = "server-01"
      config.git_provider = "git.mogh.tech" # use an alternate git provider (default is github.com)
      config.git_account = "mbecker20"
      config.repo = "mbecker20/monitor"
      # Run an action after the repo is pulled
      config.on_pull.path = "."
      config.on_pull.command = "/root/.cargo/bin/cargo build -p monitor_periphery --release && cp ./target/release/periphery /root/periphery"

      User Group:

      • UserGroup schema
      • diff --git a/docs/version-upgrades.html b/docs/version-upgrades.html index 95e5d05bf..402241807 100644 --- a/docs/version-upgrades.html +++ b/docs/version-upgrades.html @@ -4,7 +4,7 @@ Version Upgrades | monitor - + diff --git a/index.html b/index.html index a2ea3c7d0..99034ea6e 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ monitor docs | monitor - +