This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/directives/credentials-dialog.html

169 lines
8.3 KiB
HTML
Raw Normal View History

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">
<cor-tab-panel remember-cookie="quay.credentialsTab" vertical-tabs="true">
2016-04-29 23:37:35 +00:00
<!-- Tabs -->
<cor-tabs>
2017-05-05 20:30:34 +00:00
<cor-tab tab-active="true" tab-id="cred-secret-{{ ::dialogID }}">
2016-04-29 23:37:35 +00:00
<i class="fa" ng-class="entityIcon"></i> {{ secretTitle }}
</cor-tab>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab tab-id="cred-kubernetes-{{ ::dialogID }}">
2016-04-29 23:37:35 +00:00
<i class="fa kubernetes-icon icon"></i> Kubernetes Secret
</cor-tab>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab tab-id="cred-rkt-{{ ::dialogID }}">
2016-04-29 23:37:35 +00:00
<i class="fa rocket-icon icon"></i> rkt Configuration
</cor-tab>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab tab-id="cred-docker-login-{{ ::dialogID }}">
2016-04-29 23:37:35 +00:00
<i class="fa docker-icon icon"></i> Docker Login
</cor-tab>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab tab-id="cred-docker-{{ ::dialogID }}">
2016-04-29 23:37:35 +00:00
<i class="fa docker-icon icon"></i> Docker Configuration
</cor-tab>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab tab-id="cred-mesos-{{ ::dialogID }}" quay-show="isDownloadSupported()">
2016-04-29 23:37:35 +00:00
<i class="fa mesos-icon icon"></i> Mesos Credentials
</cor-tab>
</cor-tabs>
2016-04-29 23:37:35 +00:00
<!-- Tab contents -->
<cor-tab-content>
2016-04-29 23:37:35 +00:00
<h3>
Credentials for {{ credentials.username }}
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</h3>
2017-05-05 20:30:34 +00:00
<cor-tab-pane id="cred-secret-{{ ::dialogID }}">
2016-04-29 23:37:35 +00:00
<label>{{ secretTitle }}:</label>
<div class="copy-box" value="credentials.password"></div>
<div class="help-text">
Username is {{ credentials.username }} and password is the {{ secretTitle }}
</div>
<div ng-transclude/>
</cor-tab-pane>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab-pane id="cred-kubernetes-{{ ::dialogID }}">
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>
</cor-tab-pane>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab-pane id="cred-mesos-{{ ::dialogID }}">
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>
</cor-tab-pane>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab-pane id="cred-rkt-{{ ::dialogID }}">
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>
</cor-tab-pane>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab-pane id="cred-docker-login-{{ ::dialogID }}">
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>
</cor-tab-pane>
2016-04-29 23:37:35 +00:00
2017-05-05 20:30:34 +00:00
<cor-tab-pane id="cred-docker-{{ ::dialogID }}">
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>
</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>