Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated upstream repo & app style for jenkins, minio and grafana #280

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

nitishkumar71
Copy link
Contributor

Signed-off-by: Nitishkumar Singh [email protected]

New Upstream repo urls has been updated for jenkins, minio and grafana

Description

Motivation and Context

How Has This Been Tested?

Jenkins

  1. Install Jenkins
    arkade install jenkins

  2. Get Credentials

export USER=$(kubectl get secret jenkins \
        -o jsonpath="{.data.jenkins-admin-user}" | base64 --decode)
export PASS=$(kubectl get secret jenkins \
        -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode)
echo "Credentials: $USER / $PASS"
  1. Port-forward the Jenkins service
    kubectl port-forward svc/jenkins 8080:8080 &

  2. Open the Jenkins UI at:
    echo http://127.0.0.1:8080

  3. Use Credentials obtained in step 2 for login

minio

  1. Install minio
    arkade install minio

  2. Forward the minio port to your machine
    kubectl port-forward -n default svc/minio 9000:9000 &

  3. Get the access and secret key to gain access to minio

ACCESSKEY=$(kubectl get secret -n default minio -o jsonpath="{.data.accesskey}" | base64 --decode; echo)
SECRETKEY=$(kubectl get secret -n default minio -o jsonpath="{.data.secretkey}" | base64 --decode; echo)

  1. Get the Minio Client
curl -SLf https://dl.min.io/client/mc/release/linux-amd64/mc \
  && chmod +x mc

  1. Add a host
    mc config host add minio http://127.0.0.1:9000 $ACCESSKEY $SECRETKEY
  2. List buckets
    mc ls minio

Grafana

  1. Install grafana
    arkade install grafana

  2. Get the admin password:
    kubectl get secret --namespace grafana grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo

  3. Expose the service via port-forward:
    kubectl --namespace grafana port-forward service/grafana 3000:80

  4. Use credential obtained in step2 with username admin to login on grafana

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have tested this on arm, or have added code to prevent deployment

@nitishkumar71 nitishkumar71 changed the title updated upstream repo for jenkins, minio and grafana [WIP] Updated upstream repo for jenkins, minio and grafana Nov 25, 2020
@nitishkumar71 nitishkumar71 changed the title [WIP] Updated upstream repo for jenkins, minio and grafana [WIP] Updated upstream repo & app style for jenkins, minio and grafana Nov 25, 2020
@nitishkumar71 nitishkumar71 changed the title [WIP] Updated upstream repo & app style for jenkins, minio and grafana Updated upstream repo & app style for jenkins, minio and grafana Nov 25, 2020
@nitishkumar71
Copy link
Contributor Author

@alexellis @Waterdrips Can you please review it?

@@ -36,13 +37,28 @@ func MakeInstallGrafana() *cobra.Command {
const chartVersion = "5.0.4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add the --set flag to this app, then merge the set values with overrides just before calling the install?

Copy link
Contributor Author

@nitishkumar71 nitishkumar71 Nov 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Waterdrips Since we are using helm version v3.1.2 in arkade. Grafana helm charts above 6.0.0 recommend helm version >= 3.4.0. I think which is why the grafana version was hardcoded earlier itself.

Possibly @aidun can put some more lights on it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some charts that won't install with a newer helm version. The Grafana chart may recommend 3.4.0, but is it a hard requirement?

Copy link
Contributor Author

@nitishkumar71 nitishkumar71 Dec 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it and nothing broke in installation. Not sure, why the recommendation from grafana team. helm 3.4.0 is recommended for chart from 6.0.0

@nitishkumar71 nitishkumar71 force-pushed the new_upstream_repos branch 2 times, most recently from db529e9 to d7e46d6 Compare December 5, 2020 04:26

grafana.RunE = func(command *cobra.Command, args []string) error {

const chartVersion = "5.0.4"

// Get all flags
kubeConfigPath, _ := command.Flags().GetString("kubeconfig")
kubeConfigPath, err := command.Flags().GetString("kubeconfig")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move the error handling into PreRunE - there are some examples you can follow in the code elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Nitishkumar Singh <[email protected]>

updated grafana, minio and jenkins to new style

Signed-off-by: Nitishkumar Singh <[email protected]>

removed additional commented code

Signed-off-by: Nitishkumar Singh <[email protected]>

included set options

Signed-off-by: Nitishkumar Singh <[email protected]>

moved flag error handling to prerun

Signed-off-by: Nitishkumar Singh <[email protected]>
@alexellis
Copy link
Owner

@Waterdrips please can you give this a final pass?

@alexellis alexellis requested review from Waterdrips and removed request for Waterdrips December 9, 2020 09:38
Copy link
Contributor

@Waterdrips Waterdrips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexellis alexellis merged commit 37ae4ef into alexellis:master Dec 9, 2020
@nitishkumar71 nitishkumar71 deleted the new_upstream_repos branch March 16, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants