Skip to content

Commit

Permalink
updating Epinio to 1.11, update for info with json
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman committed Dec 5, 2023
1 parent 52e1597 commit 0947dd0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ARG KUBECTL_CHECKSUM_LINUX_AMD64=aaa5ea3b3630730d2b8a8ef3cccb14b47754602c7207c7b
ARG KUBECTL_CHECKSUM_WINDOWS_AMD64=ed404eb0c3b74341d2ff799e78f9c0352e2bbd5c1b645652de2725ec77c0a78e

# https://github.com/epinio/epinio/releases
ARG EPINIO_VERSION=1.11.0-rc1
ARG EPINIO_VERSION=1.11.0

# /darwin amd64
RUN wget -nv https://get.helm.sh/helm-v${HELM_VERSION}-darwin-amd64.tar.gz && \
Expand Down Expand Up @@ -113,7 +113,7 @@ ARG KUBECTL_CHECKSUM_DARWIN_ARM64=4166d293b4f58e5293363f1f91a285d929a54557bf0c1a
ARG KUBECTL_CHECKSUM_LINUX_ARM64=741e65b681a22074aaf9459b57dbcef6a9e993472b3019a87f57c191bc68575f

# https://github.com/epinio/epinio/releases
ARG EPINIO_VERSION=1.11.0-rc1
ARG EPINIO_VERSION=1.11.0

# /darwin arm64
RUN wget -nv https://get.helm.sh/helm-v${HELM_VERSION}-darwin-arm64.tar.gz && \
Expand Down
15 changes: 4 additions & 11 deletions ui/src/epinio/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,11 @@ export default function EpinioClient({
const info = async () => {
console.log('EpinioClient.info')

// TODO: update with '--output json' flag
const result = await epinio(['info'])
const lines = result.split('\n')

for (const i in lines) {
if (lines[i].indexOf('Epinio Server Version: ') === 0) {
const version = lines[i].replace('Epinio Server Version: ', '')
return { version }
}
}
const result = await epinio([
'info', '--output', 'json'
])

return { version: 'unknown' }
return JSON.parse(result)
}

const listApplications = async (namespace) => {
Expand Down
8 changes: 6 additions & 2 deletions ui/src/epinio/Installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ export default function EpinioInstaller({
setInstalled(false)
onInstallationChanged(false)

message = 'Error installing Epinio'
if (error.stderr) {
message = error.stderr
}
console.error(error)
const message = `If the nginx service is stuck in pending state, you might need to restart docker desktop. \n ${JSON.stringify(error)}`

onError(message)
} finally {
setProgress(0)
Expand Down Expand Up @@ -164,7 +168,7 @@ export default function EpinioInstaller({
'--create-namespace', '--namespace', 'epinio',
'--atomic',
'--set', 'global.domain=' + domain,
'https://github.com/epinio/helm-charts/releases/download/epinio-1.11.0-rc1/epinio-1.11.0-rc1.tgz'
'https://github.com/epinio/helm-charts/releases/download/epinio-1.11.0/epinio-1.11.0.tgz'
])

console.log('installed: epinio')
Expand Down

0 comments on commit 0947dd0

Please sign in to comment.