1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker Desktop for Mac の kubernetes に Helm で Redmineをインストールする

Posted at

はじめに

Helmを使用してRedmineをインストールします。

環境

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.4", GitCommit:"c96aede7b5205121079932896c4ad89bb93260af", GitTreeState:"clean", BuildDate:"2020-06-18T02:59:13Z", GoVersion:"go1.14.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:18:29Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
$ helm version
version.BuildInfo{Version:"v3.2.4", GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688", GitTreeState:"dirty", GoVersion:"go1.14.3"}

手順

インストール

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install redmine bitnami/redmine
NAME: redmine
LAST DEPLOYED: Wed Jul 15 01:07:13 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the Redmine URL:

  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
        Watch the status with: 'kubectl get svc --namespace default -w redmine'


  export SERVICE_IP=$(kubectl get svc --namespace default redmine --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
  echo "Redmine URL: http://$SERVICE_IP/"

2. Login with the following credentials

  echo Username: user
  echo Password: $(kubectl get secret --namespace default redmine -o jsonpath="{.data.redmine-password}" | base64 --decode)

起動するのに3分くらいかかりました。

$ kubectl get deployment
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
redmine   1/1     1            1           4m44s
$ kubectl get svc
NAME              TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes        ClusterIP      10.96.0.1       <none>        443/TCP        12d
redmine           LoadBalancer   10.110.55.117   localhost     80:31979/TCP   3m15s
redmine-mariadb   ClusterIP      10.97.11.188    <none>        3306/TCP       3m15s

パスワード設定

$ export SERVICE_IP=$(kubectl get svc --namespace default--template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
$ echo "Redmine URL: http://$SERVICE_IP/"
Redmine URL: http://localhost/
$ echo Password: $(kubectl get secret --namespace default redmine -o jsonpath="{.data.redmine-password}" | base64 --decode)
Password: XXXXXXXXXX

localhost:80にアクセスするとGUIが表示されます。User:userPassword:XXXXXXXXXXでログインできます。

プラグインのインストール

pod名を確認し、podにログインします。

$ kubectl get pod
NAME                       READY   STATUS    RESTARTS   AGE
redmine-749bcf6778-rlccb   1/1     Running   1          27m
redmine-mariadb-0          1/1     Running   0          27m
$ kubectl exec -it redmine-749bcf6778-rlccb /bin/bash

プラグインをインストールするディレクトリに移動します。

# cd /opt/bitnami/redmine/plugins
# ls
README
# cat README 
Put your Redmine plugins here.

インストールできるプラグインはPlugins Directoryで一覧を見ることが出来ます。
今回はIssue Templatesを例にインストールします。

# git clone https://github.com/akiko-pusu/redmine_issue_templates.git
Cloning into 'redmine_issue_templates'...
remote: Enumerating objects: 118, done.
remote: Counting objects: 100% (118/118), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 6045 (delta 60), reused 81 (delta 38), pack-reused 5927
Receiving objects: 100% (6045/6045), 1.24 MiB | 1.41 MiB/s, done.
Resolving deltas: 100% (3706/3706), done.
# cd ..
# bundle update
# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
== 1 CreateIssueTemplates: migrating ==========================================
...
== 20200418114157 CreateJoinTableGlobalNoteTemplateProject: migrated (0.0095s)

再起動しなくてもOKです(多分)。自分の場合は一回ログアウトして、再ログインしたら[管理]-[プラグイン]画面にプラグインが表示されていました。

スクリーンショット 2020-07-15 2.29.12.png

参考

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?