Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee02016f16 | ||
|
|
e5024b7f0a | ||
|
|
d408d33971 | ||
|
|
cff29ed862 |
@@ -17,12 +17,23 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- run: make xbuild-all
|
||||
- run:
|
||||
name: "Build latest master from porter repo"
|
||||
command: |
|
||||
export GO111MODULE=off
|
||||
go get -u get.porter.sh/porter || true
|
||||
cd /go/src/get.porter.sh/porter
|
||||
# store porter master commit
|
||||
git rev-parse HEAD > /go/porter-master-commit.txt
|
||||
make xbuild-all VERSION=latest
|
||||
cp -r bin/latest/* /go/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/bin/${CIRCLE_TAG}/
|
||||
- run:
|
||||
name: "Publish Release on GitHub"
|
||||
command: |
|
||||
go get github.com/tcnksm/ghr
|
||||
# VERSION=v$(./artifacts/qliksense-linux-amd64 version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
|
||||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} /go/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/bin/${CIRCLE_TAG}/
|
||||
PORTER_REPO_COMMIT=$(cat /go/porter-master-commit.txt)
|
||||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -b "porter build based on commit: https://github.com/deislabs/porter/commit/${PORTER_REPO_COMMIT}" -delete ${CIRCLE_TAG} /go/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/bin/${CIRCLE_TAG}/
|
||||
workflows:
|
||||
version: 2
|
||||
commit:
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
||||
PKG = qlik-oss/sense-installer
|
||||
PKG = github.com/qlik-oss/sense-installer
|
||||
|
||||
# --no-print-directory avoids verbose logging when invoking targets that utilize sub-makes
|
||||
MAKE_OPTS ?= --no-print-directory
|
||||
|
||||
11
README.md
11
README.md
@@ -7,9 +7,16 @@ The Qlik Sense installations and operations CLI provides capabilities for instal
|
||||
Download the appropriate executable for your platform from the [releases page](https://github.com/qlik-oss/sense-installer/releases). When used, the CLI will check to see if porter is installed, if not, will download and install it. Once done, you can find porter through `echo $HOME/.porter` on Linux and MacOS and in `$Env:USERPROFILE\.porter` on Windows. You can also install it in advance, release > 0.22.1-beta.1 is required.
|
||||
|
||||
To make sure everything is order, you can fetch the Qlik Sense bundle version and corresponding image list from:
|
||||
- `qliksense about -tag qlik/qliksense-cnab-bundle:latest `
|
||||
- `qliksense about --tag qlik/qliksense-cnab-bundle:latest `
|
||||
|
||||
## Running Preflight checks
|
||||
You can run preflight checks to ensure that the cluster is in a healthy state before installing Qliksense.
|
||||
- `qliksense preflight -c <credential_name> `
|
||||
|
||||
The above command runs the checks in the default namespace. If you want to specify the namespace to run preflight checks on:
|
||||
- `qliksense preflight --param namespace=<value> -c <credential_name> `
|
||||
|
||||
## Qliksense Packaging
|
||||
Packaging of Qlik Sense on Kubernetes is done through a [Porter](https://porter.sh/) definition in the [Qlik Sense on Kubernetes configuration repository](https://github.com/qlik-oss/qliksense-k8s/blob/master/porter.yaml), the resulting bundle publisked on DockerHub as a [Cloud Natvie Application Bundle](https://cnab.io/) called [qliksense-cnab-bundle](https://hub.docker.com/r/qlik/qliksense-cnab-bundle).
|
||||
Packaging of Qlik Sense on Kubernetes is done through a [Porter](https://porter.sh/) definition in the [Qlik Sense on Kubernetes configuration repository](https://github.com/qlik-oss/qliksense-k8s/blob/master/porter.yaml), the resulting bundle published on DockerHub as a [Cloud Natvie Application Bundle](https://cnab.io/) called [qliksense-cnab-bundle](https://hub.docker.com/r/qlik/qliksense-cnab-bundle).
|
||||
### Versioning
|
||||
A version of [qliksense-cnab-bundle](https://hub.docker.com/r/qlik/qliksense-cnab-bundle) is published corresponding to an edge release. To get the latest edge release simply specify `qliksense-cnab-bundle:latest`
|
||||
|
||||
@@ -15,6 +15,7 @@ func buildAliasCommands(porterCmd *cobra.Command, q *qliksense.Qliksense) []*cob
|
||||
buildBuildAlias(porterCmd),
|
||||
buildInstallAlias(porterCmd, q),
|
||||
buildAboutAlias(porterCmd),
|
||||
buildPreflightAlias(porterCmd, q),
|
||||
}
|
||||
|
||||
}
|
||||
@@ -172,6 +173,36 @@ func buildAboutAlias(porterCmd *cobra.Command) *cobra.Command {
|
||||
return c
|
||||
}
|
||||
|
||||
func buildPreflightAlias(porterCmd *cobra.Command, q *qliksense.Qliksense) *cobra.Command {
|
||||
var (
|
||||
c *cobra.Command
|
||||
opts *paramOptions
|
||||
)
|
||||
|
||||
opts = ¶mOptions{}
|
||||
|
||||
c = &cobra.Command{
|
||||
Use: "preflight",
|
||||
Short: "Preflight Checks",
|
||||
Long: "Perform Preflight Checks",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
args = append(os.Args[1:], opts.getTagDefaults(args)...)
|
||||
return porterCmd.RunE(porterCmd, append([]string{"invoke", "--action", "preflight"}, args...))
|
||||
},
|
||||
Annotations: map[string]string{
|
||||
"group": "alias",
|
||||
},
|
||||
}
|
||||
f := c.Flags()
|
||||
f.StringSliceVar(&opts.Params, "param", nil,
|
||||
"Define an individual parameter in the form NAME=VALUE. Overrides parameters set with the same name using --param-file. May be specified multiple times.")
|
||||
f.StringSliceVar(&opts.ParamFiles, "param-file", nil,
|
||||
"Path to a parameters definition file for the bundle, each line in the form of NAME=VALUE. May be specified multiple times.")
|
||||
f.StringSliceVarP(&opts.CredentialIdentifiers, "cred", "c", nil,
|
||||
"Credential to use when installing the bundle. May be either a named set of credentials or a filepath, and specified multiple times.")
|
||||
return c
|
||||
}
|
||||
|
||||
func (o *paramOptions) findKey(param string) *string {
|
||||
var (
|
||||
value *string
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/qlik-oss/sense-installer/pkg"
|
||||
"github.com/qlik-oss/sense-installer/pkg/qliksense"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
@@ -43,10 +44,10 @@ func initAndExecute() error {
|
||||
|
||||
func installPorter() (string, error) {
|
||||
var (
|
||||
//porterPermaLink = pkg.Version
|
||||
porterPermaLink = "v0.3.0"
|
||||
porterPermaLink = pkg.Version
|
||||
//porterPermaLink = "v0.3.0"
|
||||
destination, homeDir, mixin, mixinOpts, qlikSenseHome, porterExe, ext string
|
||||
mixinsVar = map[string]string{
|
||||
mixinsVar = map[string]string{
|
||||
"kustomize": "-v 0.2-beta-3-0e19ca4 --url https://github.com/donmstewart/porter-kustomize/releases/download",
|
||||
"qliksense": "-v v0.11.0 --url https://github.com/qlik-oss/porter-qliksense/releases/download",
|
||||
"exec": "-v latest",
|
||||
@@ -97,7 +98,7 @@ func installPorter() (string, error) {
|
||||
if downloadPorter {
|
||||
os.Mkdir(qlikSenseHome, os.ModePerm)
|
||||
destination = filepath.Join(qlikSenseHome, porterRuntime)
|
||||
if err = downloadFile(porterURLBase+"/"+porterPermaLink+"/porter-linux-amd64", destination ); err != nil {
|
||||
if err = downloadFile(porterURLBase+"/"+porterPermaLink+"/porter-linux-amd64", destination); err != nil {
|
||||
return "", err
|
||||
}
|
||||
os.Chmod(destination, 0755)
|
||||
|
||||
Reference in New Issue
Block a user