| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 1 | input: { |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 2 | network: #Network @name(Network) |
| gio | 44f621b | 2024-04-29 09:44:38 +0400 | [diff] [blame] | 3 | subdomain: string @name(Subdomain) |
| gio | efa0ed4 | 2024-06-13 12:31:43 +0400 | [diff] [blame] | 4 | sshPort: int @name(SSH Port) @role(port) |
| gio | 44f621b | 2024-04-29 09:44:38 +0400 | [diff] [blame] | 5 | adminKey: string @name(Admin SSH Public Key) |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 6 | } |
| 7 | |
| gio | 0eaf271 | 2024-04-14 13:08:46 +0400 | [diff] [blame] | 8 | _domain: "\(input.subdomain).\(input.network.domain)" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 9 | |
| Giorgi Lekveishvili | ef21c13 | 2024-01-17 18:57:58 +0400 | [diff] [blame] | 10 | name: "Soft-Serve" |
| 11 | namespace: "app-soft-serve" |
| 12 | // TODO(gio): make public network an option |
| 13 | readme: "softserve application will be installed on private network and be accessible to any user on https://\(_domain)" |
| 14 | description: "A tasty, self-hostable Git server for the command line. 🍦" |
| gio | 8c942d2 | 2024-07-17 13:43:02 +0400 | [diff] [blame] | 15 | icon: """ |
| 16 | <svg width='50px' height='50px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28.17637795 39.68590646'> |
| 17 | <defs> |
| 18 | <style> |
| 19 | .cls-1 { |
| 20 | fill: currentColor; |
| 21 | } |
| 22 | |
| 23 | .cls-2 { |
| 24 | fill: none; |
| 25 | stroke: #3a3a3a; |
| 26 | stroke-miterlimit: 10; |
| 27 | stroke-width: .98133445px; |
| 28 | } |
| 29 | </style> |
| 30 | </defs> |
| 31 | <rect class='cls-2' x='-15.72872096' y='-9.97395671' width='59.63381987' height='59.63381987'/> |
| 32 | <g> |
| 33 | <path class='cls-1' d='m14.08828766,39.68590646c-.24966985,0-.47802402-.14131246-.58973401-.36472824l-2.87761777-5.75512747-5.45346067-13.9623024c-.13243358-.33946568.03513141-.72156194.37420873-.85419039.33927469-.13262845.72157548.03473602.85381169.3742017l5.42918447,13.90783,2.26321282,4.52199865,2.28827849-4.57647105,5.40471091-13.8533576c.13243358-.33788677.51374753-.5060407.85381169-.3742017.33907732.13262845.50664231.51472471.37420873.85419039l-5.42898711,13.90783-2.90209134,5.80959987c-.11151262.22341579-.33986679.36472824-.58953664.36472824Z'/> |
| 34 | <path class='cls-1' d='m18.88431728,29.13483942h-9.59205924c-.36414299,0-.65920736-.2952562-.65920736-.65919498s.29506437-.65919498.65920736-.65919498h9.59205924c.36414299,0,.65920736.2952562.65920736.65919498s-.29506437.65919498-.65920736.65919498Z'/> |
| 35 | <path class='cls-1' d='m5.45484225,20.50214821c-.08269697,0-.16559131-.0157891-.24414357-.0473673-.21276214-.08447169-5.21069868-2.14337052-5.21069868-7.32614307,0-4.61041762,4.65846449-6.74115686,5.90878744-7.230619.52262907-1.25207574,2.82373645-5.89801884,8.17950022-5.89801884s7.65687115,4.6459431,8.17950022,5.89801884c1.25032295.48946214,5.90859007,2.62099084,5.90859007,7.230619,0,5.18277255-4.99773918,7.24167137-5.21050131,7.32614307-.18572279.07499823-.39670862.05999859-.57078673-.0386833-.03236827-.01894692-3.28912895-1.83232522-8.30680224-1.83232522s-8.27443398,1.8133783-8.30680224,1.83232522c-.10065741.05684077-.21335424.0860506-.32664317.0860506ZM14.08828766,1.31838997c-5.19806716,0-6.97555863,5.08882739-7.0485846,5.30592754-.06592074.1949954-.22045947.3497286-.41585327.41525337-.05309185.01736801-5.30543507,1.83311468-5.30543507,6.08906697,0,3.70728102,3.15531381,5.5175015,4.1153092,5.98170108.96295591-.47840977,4.11215132-1.8449565,8.65456373-1.8449565s7.69160783,1.36654673,8.65456373,1.8449565c.95979803-.46419958,4.11511183-2.27442006,4.11511183-5.98170108,0-4.25595229-5.25234322-6.07169896-5.3052377-6.08906697-.1953938-.06552477-.34993253-.22025797-.41585327-.41525337-.07302597-.21710014-1.85051744-5.30592754-7.0485846-5.30592754Zm-7.67364739,5.09593249h.00809207-.00809207Z'/> |
| 36 | </g> |
| 37 | </svg>""" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 38 | |
| 39 | images: { |
| 40 | softserve: { |
| 41 | repository: "charmcli" |
| 42 | name: "soft-serve" |
| 43 | tag: "v0.7.1" |
| 44 | pullPolicy: "IfNotPresent" |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | charts: { |
| 49 | softserve: { |
| gio | f884341 | 2024-05-22 16:38:05 +0400 | [diff] [blame] | 50 | kind: "GitRepository" |
| gio | 9877f29 | 2024-08-17 15:11:15 +0400 | [diff] [blame] | 51 | address: "https://code.v1.dodo.cloud/helm-charts" |
| gio | f884341 | 2024-05-22 16:38:05 +0400 | [diff] [blame] | 52 | branch: "main" |
| 53 | path: "charts/soft-serve" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 54 | } |
| 55 | } |
| 56 | |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 57 | ingress: { |
| gio | 0eaf271 | 2024-04-14 13:08:46 +0400 | [diff] [blame] | 58 | gerrit: { // TODO(gio): rename to soft-serve |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 59 | auth: enabled: false |
| 60 | network: input.network |
| 61 | subdomain: input.subdomain |
| 62 | service: { |
| 63 | name: "soft-serve" |
| 64 | port: number: 80 |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | portForward: [#PortForward & { |
| 70 | allocator: input.network.allocatePortAddr |
| gio | efa0ed4 | 2024-06-13 12:31:43 +0400 | [diff] [blame] | 71 | reservator: input.network.reservePortAddr |
| gio | cdfa372 | 2024-06-13 20:10:14 +0400 | [diff] [blame] | 72 | deallocator: input.network.deallocatePortAddr |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 73 | sourcePort: input.sshPort |
| gio | 3e67ce1 | 2024-06-13 19:47:19 +0400 | [diff] [blame] | 74 | serviceName: "soft-serve" |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 75 | targetPort: 22 |
| 76 | }] |
| 77 | |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 78 | helm: { |
| 79 | softserve: { |
| 80 | chart: charts.softserve |
| gio | f9f0bee | 2024-06-11 20:10:05 +0400 | [diff] [blame] | 81 | info: "Installing SoftServe server" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 82 | values: { |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 83 | serviceType: "ClusterIP" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 84 | adminKey: input.adminKey |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 85 | sshPublicPort: input.sshPort |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 86 | ingress: { |
| 87 | enabled: false |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 88 | domain: _domain |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 89 | } |
| 90 | image: { |
| 91 | repository: images.softserve.fullName |
| 92 | tag: images.softserve.tag |
| 93 | pullPolicy: images.softserve.pullPolicy |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | } |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 98 | |
| 99 | help: [{ |
| 100 | title: "Access" |
| 101 | contents: """ |
| 102 | SSH CLI: ssh \(_domain) -p \(input.sshPort) help |
| 103 | SSH TUI: ssh \(_domain) -p \(input.sshPort) |
| gio | 4e3e998 | 2024-05-20 13:09:45 +0400 | [diff] [blame] | 104 | Create repository: ssh \(_domain) -p \(input.sshPort) repos create \\<REPO-NAME\\> |
| 105 | HTTP: git clone https://\(_domain)/\\<REPO-NAME\\> |
| 106 | SSH: git clone ssh://\(_domain):\(input.sshPort)/\\<REPO-NAME\\> |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 107 | |
| 108 | See following resource on what you can do with Soft-Serve TUI: [https://github.com/charmbracelet/soft-serve](https://github.com/charmbracelet/soft-serve) |
| 109 | """ |
| 110 | }] |