-
Notifications
You must be signed in to change notification settings - Fork 62
/
vmware-utils-install.sh
executable file
·60 lines (45 loc) · 1.49 KB
/
vmware-utils-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#### ---- Installer Files ---- ####
VSPHERE65_AUTOMATION_SDK_PYTHON=VMware-vSphere-Automation-SDK-Python-6.5.0-4571810.zip
VSAN65_SDK_PYTHON=vsan-sdk-65-python-4602587.zip
#### ---- Install Package Dependencies ---- ####
apt-get update && \
apt-get install -yq --no-install-recommends \
build-essential \
gcc \
gcc-multilib \
libssl-dev \
git \
python \
python-setuptools \
python-dev \
python-pip \
python-virtualenv \
unzip \
iputils-ping \
module-init-tools \
curl \
vim && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/*
pip install --upgrade pip
#### ---- Install vSphere SDK for Python (pyvmomi) 6.5 ---- ####
pip install pyvmomi
#### ---- Install vSphere Automation SDK for Python 6.5 ---- ####
unzip /tmp/$VSPHERE65_AUTOMATION_SDK_PYTHON && \
rm -f /tmp/$VSPHERE65_AUTOMATION_SDK_PYTHON
chmod +x VMware-vSphere-Automation-SDK-Python-6.5.0/client/bin/run_sample.sh
#### ---- Install VSAN Management SDK for Python 6.5 ---- ####
unzip /tmp/$VSAN65_SDK_PYTHON && \
rm -f /tmp/$VSAN65_SDK_PYTHON && \
cp /root/vsan-sdk-python/bindings/*.py /root/vsan-sdk-python/samplecode
#### ---- Community Sample Code Repositories ---- ####
mkdir script-repos
git clone https://github.com/lamw/vghetto-scripts /root/script-repos/vghetto-scripts
git clone https://github.com/lamw/pyvmomi-community-samples /root-script-repos/pyvmomi-community-samples
# apt-get remove all shit
apt-get -y purge build-essential \
gcc \
gcc-multilib
apt-get autoremove -y
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*