2016-04-29 23:37:35 +00:00
< div class = "credentials-dialog-element" >
< div class = "modal fade co-dialog wider" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-body" ng-show = "credentials.loading" >
< div class = "cor-loader" > < / div >
< / div >
< div class = "co-tab-modal-body" ng-show = "!credentials.loading" >
2017-05-29 22:39:14 +00:00
< cor-tab-panel orientation = "vertical" cor-cookie-tabs = "quay.credentialsTab" >
2016-04-29 23:37:35 +00:00
<!-- Tabs -->
2017-04-28 21:03:38 +00:00
< cor-tabs >
2018-04-25 20:01:13 +00:00
< cor-tab tab-active = "true" tab-id = "cred-secret" >
2016-04-29 23:37:35 +00:00
< i class = "fa" ng-class = "entityIcon" > < / i > {{ secretTitle }}
2017-04-28 21:03:38 +00:00
< / cor-tab >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab tab-id = "cred-kubernetes" >
2016-04-29 23:37:35 +00:00
< i class = "fa kubernetes-icon icon" > < / i > Kubernetes Secret
2017-04-28 21:03:38 +00:00
< / cor-tab >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab tab-id = "cred-rkt" >
2016-04-29 23:37:35 +00:00
< i class = "fa rocket-icon icon" > < / i > rkt Configuration
2017-04-28 21:03:38 +00:00
< / cor-tab >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab tab-id = "cred-docker" >
2016-04-29 23:37:35 +00:00
< i class = "fa docker-icon icon" > < / i > Docker Login
2017-04-28 21:03:38 +00:00
< / cor-tab >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab tab-id = "cred-docker-config" >
2016-04-29 23:37:35 +00:00
< i class = "fa docker-icon icon" > < / i > Docker Configuration
2017-04-28 21:03:38 +00:00
< / cor-tab >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab tab-id = "cred-mesos" quay-show = "isDownloadSupported()" >
2016-04-29 23:37:35 +00:00
< i class = "fa mesos-icon icon" > < / i > Mesos Credentials
2017-04-28 21:03:38 +00:00
< / cor-tab >
< / cor-tabs >
2016-04-29 23:37:35 +00:00
<!-- Tab contents -->
2017-04-28 21:03:38 +00:00
< cor-tab-content >
2018-04-27 14:01:00 +00:00
< h3 class = "dialog-title-header" >
< div class = "dialog-title" > Credentials for {{ credentials.title || credentials.username }}< / div >
2016-04-29 23:37:35 +00:00
< button type = "button" class = "close" data-dismiss = "modal" aria-hidden = "true" > × < / button >
< / h3 >
2018-04-25 20:01:13 +00:00
< cor-tab-pane id = "cred-secret" >
2018-04-27 14:01:00 +00:00
< label > Username & {{ secretTitle }}:< / label >
< div class = "conjoined-box-wrapper" >
< div class = "copy-box conjoined-box-top" value = "credentials.username" > < / div >
< div class = "copy-box conjoined-box-bottom" value = "credentials.password" > < / div >
< / div >
2016-04-29 23:37:35 +00:00
< div ng-transclude / >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab-pane id = "cred-kubernetes" >
2016-04-29 23:37:35 +00:00
< label > Step 1: Download secret< / label >
< div class = "action-text" > First, download the Kubernetes pull secret for the {{ entityTitle }}:< / div >
< ul class = "action-bar" >
< li > < a ng-click = "downloadFile(getKubernetesFile(credentials))" ng-if = "isDownloadSupported()" > < i class = "fa fa-download" > < / i > Download {{ getKubernetesFilename(credentials) }}< / li > < / a >
< li > < a ng-click = "viewFile(k8s)" > < i class = "fa fa-code" > < / i > View {{ getKubernetesFilename(credentials) }}< / li > < / a >
< / ul >
< textarea class = "form-control viewing-file" ng-if = "k8s.viewingFile" readonly > {{ getKubernetesFile(credentials).contents }}< / textarea >
< label > Step 2: Submit< / label >
< div class = "action-text" > Second, submit the secret to the cluster using this command:< / div >
< div class = "copy-box" value = "'kubectl create -f ' + getKubernetesFilename(credentials) + ' --namespace=NAMESPACEHERE'" > < / div >
< label > Step 3: Update Kubernetes configuration< / label >
< div class = "action-text" >
Finally, < a href = "http://kubernetes.io/docs/user-guide/images/#specifying-imagepullsecrets-on-a-pod" ng-safenewtab > add a reference to the secret to your Kuberenetes pod config< / a > via an < code > imagePullSecrets< / code > field. For example:
< pre >
apiVersion: v1
kind: Pod
metadata:
name: somepod
namespace: all
spec:
containers:
- name: web
image: {{ Config.SERVER_HOSTNAME }}/{{ getNamespace(credentials) }}/somerepo
< code style = "font-weight: bold;" >
imagePullSecrets:
- name: {{ getKubernetesSecretName(credentials) }}< / code > < / pre >
< / div >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab-pane id = "cred-mesos" >
2016-04-29 23:37:35 +00:00
< label > Step 1: Download credentials bundle< / label >
< div class = "action-text" > First, download the Docker credentials file as a bundle:< / div >
< ul class = "action-bar" >
< li > < a ng-click = "downloadFile(getMesosFile(credentials))" ng-if = "isDownloadSupported()" > < i class = "fa fa-download" > < / i > Download {{ getMesosFilename(credentials) }}< / li > < / a >
< / ul >
< label > Step 2: Copy credentials bundle< / label >
< div class = "action-text" >
Second, copy the credentials bundle file < strong > {{ getMesosFilename(credentials) }}< / strong >
into a location accessible to Mesos:
< / div >
< div class = "copy-box" value = "'cp ' + getMesosFilename(credentials) + ' /etc/'" > < / div >
< label > Step 3: Update Mesos configuration< / label >
< div class = "action-text" >
Finally, < a href = "https://mesosphere.github.io/marathon/docs/native-docker-private-registry.html" ng-safenewtab > add a reference to the bundle to your Mesos config< / a > via a < code > uris< / code > field. For example:
< pre >
{
"id": "/some/name/or/id",
"cpus": 1,
"mem": 1024,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "{{ Config.SERVER_HOSTNAME }}/{{ getNamespace(credentials) }}/somerepo",
"network": "HOST"
}
},
< code style = "font-weight: bold;" >
"uris": [
"file:///etc/{{ getMesosFilename(credentials) }}"
]< / code >
}< / pre >
< / div >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab-pane id = "cred-rkt" >
2016-04-29 23:37:35 +00:00
< label > Step 1: Download credentials config< / label >
< div class = "action-text" > First, download the rkt credentials file for the {{ entityTitle }}:< / div >
< ul class = "action-bar" >
< li > < a ng-click = "downloadFile(getRktFile(credentials))" ng-if = "isDownloadSupported()" > < i class = "fa fa-download" > < / i > Download {{ getRktFilename(credentials) }}< / li > < / a >
< li > < a ng-click = "viewFile(rkt)" > < i class = "fa fa-code" > < / i > View {{ getRktFilename(credentials) }}< / li > < / a >
< / ul >
< textarea class = "form-control viewing-file" ng-if = "rkt.viewingFile" readonly > {{ getRktFile(credentials).contents }}< / textarea >
< label > Step 2: Write to disk< / label >
< div class = "action-text" > Second, place the file in the rkt configuration directory:< / div >
< div class = "copy-box" value = "'mv ' + getRktFilename(credentials) + ' /etc/rkt/auth.d/'" > < / div >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab-pane id = "cred-docker" >
2016-04-29 23:37:35 +00:00
< label > Run docker login< / label >
< div class = "action-text" > Enter the following command on the command line:< / div >
< div class = "copy-box" value = "getDockerLogin(credentials)" > < / div >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
2016-04-29 23:37:35 +00:00
2018-04-25 20:01:13 +00:00
< cor-tab-pane id = "cred-docker-config" >
2016-04-29 23:37:35 +00:00
< label > Step 1: Download credentials config< / label >
< div class = "action-text" > First, download the Docker credentials file for the {{ entityTitle }}:< / div >
< ul class = "action-bar" >
< li > < a ng-click = "downloadFile(getDockerFile(credentials))" ng-if = "isDownloadSupported()" > < i class = "fa fa-download" > < / i > Download {{ getDockerFilename(credentials) }}< / li > < / a >
< li > < a ng-click = "viewFile(docker)" > < i class = "fa fa-code" > < / i > View {{ getDockerFilename(credentials) }}< / li > < / a >
< / ul >
< textarea class = "form-control viewing-file" ng-if = "docker.viewingFile" readonly > {{ getDockerFile(credentials).contents }}< / textarea >
< label > Step 2: Write to disk< / label >
< div class = "action-text" > Second, place the file in the Docker configuration directory. < strong > Note:< / strong > This will < strong > overwrite< / strong > existing credentials:< / div >
< div class = "copy-box" value = "'mv ' + getDockerFilename(credentials) + ' ~/.docker/config.json'" > < / div >
2017-04-28 21:03:38 +00:00
< / cor-tab-pane >
< / cor-tab-content >
< / cor-tab-panel >
2016-04-29 23:37:35 +00:00
< / div > <!-- /.co - tab - modal - body -->
< / div > <!-- /.modal - content -->
< / div > <!-- /.modal - dialog -->
< / div > <!-- /.modal -->
< / div >