0% found this document useful (0 votes)
28 views6 pages

CMD Commands For Deploying An Application

Uploaded by

abhishek.ibmce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views6 pages

CMD Commands For Deploying An Application

Uploaded by

abhishek.ibmce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Deploying an application using CLI

Step 1: Copy paste this command on your windows Powershell or search on browser
ibmcloud CLI download and open the docs there you find the download command for
windows.
iex (New-Object
Net.WebClient).DownloadString('https://clis.cloud.ibm.com/install/powershell')
Note: After installation restart the system
Microsoft Windows [Version 10.0.22631.4037]
(c) Microsoft Corporation. All rights reserved.
Step 2: Now login in IBM Cloud by using your credentials
Click on the right section named as “avatar” then click on “login with CLI and API” then copy
the command which is written below the “IBM Cloud CLI” and paste on the CMD
C:\Users\abhis>ibmcloud login -a https://cloud.ibm.com -u passcode -p 10SwFI9js9
API endpoint: https://cloud.ibm.com
Authenticating...
OK
Targeted account Abhishek Pandey's Account (53397c95b1284a86947feb1ed4feb8c5)
Select a region (or press enter to skip):
1. au-syd
2. in-che
3. jp-osa
4. jp-tok
5. eu-de
6. eu-es
7. eu-gb
8. ca-tor
9. us-south
10. us-east
11. br-sao
Enter a number> 5 (“enter any number”)
Targeted region eu-de
API endpoint: https://cloud.ibm.com
Region: eu-de
User: abhishek.ibmce@gmail.com
Account: Abhishek Pandey's Account (53397c95b1284a86947feb1ed4feb8c5)
Resource group: No resource group targeted, use 'ibmcloud target -g RESOURCE_GROUP'
Step 3: Set the target group by paste this command “ibmcloud target -g Default”
C:\Users\abhis>ibmcloud target -g Default
Targeted resource group Default
API endpoint: https://cloud.ibm.com
Region: eu-de
User: abhishek.ibmce@gmail.com
Account: Abhishek Pandey's Account (53397c95b1284a86947feb1ed4feb8c5)
Resource group: Default
Step 4: Install Container Service by this command “ibmcloud plugin install container-
service”
C:\Users\abhis>ibmcloud plugin install container-service
Looking up 'container-service' from repository 'IBM Cloud'...
Plug-in 'container-service[kubernetes-service/ks] 1.0.652' found in repository 'IBM Cloud'
Plug-in 'container-service[kubernetes-service/ks] 1.0.638' was already installed. Do you want
to update it with 'container-service[kubernetes-service/ks] 1.0.652' or not? [y/N] > y
Attempting to download the binary file...
30.23 MiB / 30.23 MiB
[==========================================================================
========] 100.00% 13s
31694336 bytes downloaded
Installing binary...
OK
Plug-in 'container-service 1.0.652' was successfully installed into
C:\Users\abhis\.bluemix\plugins\container-service. Use 'ibmcloud plugin show container-
service' to show its details.
Step 5: Install the container registry by this command “ibmcloud plugin install container-
registry”
C:\Users\abhis>ibmcloud plugin install container-registry
Looking up 'container-registry' from repository 'IBM Cloud'...
Plug-in 'container-registry[cr] 1.3.10' found in repository 'IBM Cloud'
Plug-in 'container-registry[cr] 1.3.10' was already installed. Do you want to re-install it or
not? [y/N] > y
Attempting to download the binary file...
12.28 MiB / 12.28 MiB
[==========================================================================
=========] 100.00% 7s
12871680 bytes downloaded
Installing binary...
OK
Plug-in 'container-registry 1.3.10' was successfully installed into
C:\Users\abhis\.bluemix\plugins\container-registry. Use 'ibmcloud plugin show container-
registry' to show its details.
Step 6: Set the region by this command “ibmcloud cr region-set eu-central”
C:\Users\abhis>ibmcloud cr region-set eu-central
The region is set to 'eu-central', the registry is 'de.icr.io'.
OK
Step 7: Set the namespace by this command “ibmcloud cr namespace-add cont-sec8”
(Note you can write anything after sec)
C:\Users\abhis>ibmcloud cr namespace-add cont-sec8
Adding namespace 'cont-sec8' in resource group 'Default' for account Abhishek Pandey's
Account in registry de.icr.io...
Successfully added namespace 'cont-sec8'
OK
Step 8: CR login by this command “ibmcloud cr login”
C:\Users\abhis>ibmcloud cr login
Logging 'docker' in to 'de.icr.io'...
Logged in to 'de.icr.io'.
OK
Step 9: Now check the docker images by this command “docker images” (Note: Docker
Desktop must be running on the background)
C:\Users\abhis>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ibmce 1.0 9c71c236a447 6 days ago 95.6MB
aman 1.0 563cc5f33a96 3 weeks ago 95.6MB
ibme0 1.0 563cc5f33a96 3 weeks ago 95.6MB
ibmeimage 1.0 563cc5f33a96 3 weeks ago 95.6MB
pandey latest c1891bc8989c 3 weeks ago 95.6MB
de.icr.io/cont-sec1/pandey-os latest c1891bc8989c 3 weeks ago 95.6MB
de.icr.io/cont-sec6/abhishek 1.0 fbf478e543ae 5 weeks ago 95.6MB
abhishek 1.0 fbf478e543ae 5 weeks ago 95.6MB
de.icr.io/cont-sec5/alpine-os latest 324bc02ae123 5 weeks ago 7.8MB
de.icr.io/cont-sec5/alpine latest 324bc02ae123 5 weeks ago 7.8MB
alpine latest 324bc02ae123 5 weeks ago 7.8MB
node latest 743c6c23d6f7 5 weeks ago 1.11GB
docker/welcome-to-docker latest c1f619b6477e 9 months ago 18.6MB
webgoat/webgoat-7.1 latest 20fef7540300 7 years ago 460MB

Step 10: Choose your image which you want to deploy


C:\Users\abhis>docker tag pandey de.icr.io/cont-sec8/pandey-os
(Note: you can write your image name instead of pandey)
Step 11: Now push the docker image by this command “docker push de.icr.io/cont-
sec8/pandey-os”
C:\Users\abhis>docker push de.icr.io/cont-sec8/pandey-os
Using default tag: latest
The push refers to repository [de.icr.io/cont-sec8/pandey-os]
558bfe0c90d1: Mounted from cont-sec1/pandey-os
8b2eac707d37: Mounted from cont-sec1/pandey-os
77fdd7507277: Mounted from cont-sec1/pandey-os
e1e544d77807: Mounted from cont-sec1/pandey-os
5f70bf18a086: Mounted from cont-sec6/abhishek
1e2a705bc95d: Mounted from cont-sec6/abhishek
7f30cde3f699: Mounted from cont-sec6/abhishek
fe810f5902cc: Mounted from cont-sec6/abhishek
dfd8c046c602: Mounted from cont-sec6/abhishek
4fc242d58285: Mounted from cont-sec6/abhishek
latest: digest:
sha256:2d34370628660280840bd24731ed2caff2dbbbbce78f40f0260951731ac9d12a size:
2403
Step 12: Now you can check your uploaded image by this command “ibmcloud cr image-
list”
C:\Users\abhis>ibmcloud cr image-list
Listing images...

Repository Tag Digest Namespace Created Size Security status


de.icr.io/cont-sec1/pandey-os latest 2d3437062866 cont-sec1 3 weeks ago 32 MB -
de.icr.io/cont-sec5/alpine-os latest eddacbc7e24b cont-sec5 1 month ago 3.6 MB -
de.icr.io/cont-sec6/abhishek 1.0 2506476cc600 cont-sec6 1 month ago 32 MB -
de.icr.io/cont-sec8/pandey-os latest 2d3437062866 cont-sec8 3 weeks ago 32 MB -

OK

C:\Users\abhis>

(“ibmcloud login -a https://cloud.ibm.com -sso


ibmcloud login
https://cloud.ibm.com/docs/cli?topic=cli-getting-started#next-steps”)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy