This blog we will talk about vsphere development center. This is for vsphere admin, those who want to automate day to day task, they can make use of it. Development center is integrated with vSphere, and it has record facility. Whenever we start activity, we have to start recording. Development center convert into the code.
vSphere 6.7 it was having the option to convert the code for powercli only.
As you can see in below screenshot, we need to enable code capture and start recording. Then start capturing using development center.
I have started code capturing using powercli and created datacenter called test.
Recently, I have one project requirement where i have to use vmware rest api and ansible to take the vcsa backup. In this blog we will first explore vcsa apiexplorer and traverse to rest api for backup
we need to open: https:<vcsa fqdn or ip>/apiexplorer
Select the appliance from the drop down and traverse to the backup job
explore POST /appliance/recover/backup/job . It will have parameter values
These are the option we will be using while coding in ansible. parts option you can get from vcsa vami console.
After exploring api, its time to look into ansible. First part would be login to vcsa apiexplore. This require authentication.
As explain above for backup request body, same way for ansible we need write json file
Now we need to write the backup task in ansible yaml file
So backup.yaml will contain login and backup task. Backup task will be calling json file , which contain vcsa backup config info.
Let me write from my experience. I started working on VMware ESXi in 2005. This was the my first experience towards concept of virtualization. There was always a discussion, that virtualization will help us to move towards cloud computing, I thought how??
We used to create datacenter where each server was running hypervisor, and create multiple vms into it. That was the limit. How can I make it accessible that environment as a service to others. When I say Service it means through web. It is not possible for everyone to install hypervisor and create vms. Even, they can do , getting each feature is very costly.
So the big player mainly amazon came with the concept. They have large number of servers [compute],storage,networking devices in a datacenter. All the servers running hypervisor and managed by any centralized access point. Now its comes to make it accessible to everyone as a service [Through Web]. I can place the order, that i need a vm. As a developer, or product owner I don’t need to worry about Datacenter, environment etc.
As a end user, I just need one OS platform where i can configure the stuff. From the web, how someone place a market order or a book order, can place a os order. It make it feasible to access remotely through internet. That is a cloud computing.
Same way Google also came up with the platform called GCP [Google Cloud platform]. Same like other providers It also provides instances [vms] through web. It can have different hypervisor, hardware etc. For end user while placing the order below are the basics.
-Compute,storage and networking: These are the basic need.
Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, It provides a series of modular cloud services including computing, data storage, data analytics and machine learning.
I will be covering more stuff in detail from basic:
How to get free tier : https://cloud.google.com/
Select option “Get Started for free”
Signup for google cloud
Most of familiar with other cloud platform. I got one good stuff from wiki, which gives similarities from other cloud services:
This blog I will write as series, where i will cover following:
While issuing command “kubeadm token list”, reporting the below issu
failed to list bootstrap tokens [Get https://192.168.40.132:6443/api/v1/namespaces/kube-system/secrets?fieldSelector=type%3Dbootstrap.kubernetes.io%2Ftoken: x509: certificate signed by unknown authority (possibly because of “crypto/rsa: verification error” while trying to verify candidate authority certificate “kubernetes”)
Perform following step:
cp /etc/kubernetes/admin.conf ~/.kube/admin.conf
kubeadm token list
TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS
h94rrx.90dkwkukxgcp3635 23h 2018-10-22T08:29:50-07:00 authentication,signing The default bootstrap token generated by ‘kubeadm init’. system:bootstrappers:kubeadm:default-node-token
vcsa 6.5, embedded vum,autodeploy and image builder service enabled.
For image customization we mapped more images [ approx 2 GB] so it was not allowing to map new image, and throwing below error message
Error while Autodeploy Image... An error occurred while generating the image : Error : An error occurred while performing the task Entry is too large to be added to cache, please remove any imported depots you are not using...
Delete the images, which are not in-use, or apply the below workaround [increase the cacheSize]
ls -lh /storage/imagebuilder/exports/
Go in vcsa --> Administrator-->System Configuration-->ServicesRestart Auto DeployRestart ImageBuilder Service