mirror of
https://github.com/Oxalide/vsphere-influxdb-go.git
synced 2023-10-10 11:36:51 +00:00
add vendoring with go dep
This commit is contained in:
3
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/.gitignore
generated
vendored
Normal file
3
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.box
|
||||
*.ova
|
||||
.vagrant
|
13
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/Vagrantfile
generated
vendored
Normal file
13
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/Vagrantfile
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# Using the VCSA base box, no provisioning, inventory will be empty.
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.hostname = "vcsa"
|
||||
|
||||
config.vm.box = "vcsa"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
config.vm.network "forwarded_port", guest: 443, host: 16443
|
||||
end
|
81
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/create-box.sh
generated
vendored
Executable file
81
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/create-box.sh
generated
vendored
Executable file
@@ -0,0 +1,81 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
PATH="/Applications/VMware Fusion.app/Contents/Library:$PATH"
|
||||
PATH="/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool:$PATH"
|
||||
fi
|
||||
|
||||
ovf="$1"
|
||||
|
||||
if [ -z "$ovf" ]; then
|
||||
ovf="./VMware-vCenter-Server-Appliance-5.5.0.10300-2000350_OVA10.ova"
|
||||
fi
|
||||
|
||||
# check for greadlink and gmktemp
|
||||
readlink=$(type -p greadlink readlink | head -1)
|
||||
mktemp=$(type -p gmktemp mktemp | head -1)
|
||||
|
||||
dir=$($readlink -nf $(dirname $0))
|
||||
tmp=$($mktemp -d)
|
||||
trap "rm -rf $tmp" EXIT
|
||||
|
||||
cd $tmp
|
||||
|
||||
echo "Converting ovf..."
|
||||
ovftool \
|
||||
--noSSLVerify \
|
||||
--acceptAllEulas \
|
||||
--overwrite \
|
||||
--powerOffTarget \
|
||||
$ovf vcsa.vmx
|
||||
|
||||
echo "Starting vm..."
|
||||
vmrun start vcsa.vmx nogui
|
||||
|
||||
echo "Waiting for vm ip..."
|
||||
ip=$(vmrun getGuestIPAddress vcsa.vmx -wait)
|
||||
|
||||
echo "Configuring vm for use with vagrant..."
|
||||
vmrun -gu root -gp vmware CopyFileFromHostToGuest vcsa.vmx \
|
||||
$dir/vagrant.sh /tmp/vagrant.sh
|
||||
|
||||
vmrun -gu root -gp vmware runProgramInGuest vcsa.vmx \
|
||||
/bin/sh -e /tmp/vagrant.sh
|
||||
|
||||
vmrun -gu root -gp vmware deleteFileInGuest vcsa.vmx \
|
||||
/tmp/vagrant.sh
|
||||
|
||||
echo "Configuring vCenter Server Appliance..."
|
||||
|
||||
ssh_opts="-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -T"
|
||||
|
||||
ssh ${ssh_opts} -i ~/.vagrant.d/insecure_private_key vagrant@$ip <<EOS
|
||||
echo "Accepting EULA ..."
|
||||
sudo /usr/sbin/vpxd_servicecfg eula accept
|
||||
|
||||
echo "Configuring Embedded DB ..."
|
||||
sudo /usr/sbin/vpxd_servicecfg db write embedded
|
||||
|
||||
echo "Configuring SSO..."
|
||||
sudo /usr/sbin/vpxd_servicecfg sso write embedded
|
||||
|
||||
echo "Starting VCSA ..."
|
||||
sudo /usr/sbin/vpxd_servicecfg service start
|
||||
EOS
|
||||
|
||||
echo "Stopping vm..."
|
||||
vmrun stop vcsa.vmx
|
||||
|
||||
rm -f vmware.log
|
||||
|
||||
sed -i -e 's/"bridged"/"nat"/' vcsa.vmx
|
||||
|
||||
echo '{"provider":"vmware_desktop"}' > ./metadata.json
|
||||
|
||||
cd $dir
|
||||
|
||||
tar -C $tmp -cvzf vcsa.box .
|
||||
|
||||
vagrant box add --name vcsa vcsa.box
|
23
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/vagrant.sh
generated
vendored
Executable file
23
vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/vagrant.sh
generated
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
useradd vagrant -m -s /bin/bash
|
||||
groupmod -A vagrant wheel
|
||||
|
||||
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
|
||||
mkdir ~vagrant/.ssh
|
||||
wget --no-check-certificate \
|
||||
https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub \
|
||||
-O ~vagrant/.ssh/authorized_keys
|
||||
chown -R vagrant ~vagrant/.ssh
|
||||
chmod -R go-rwsx ~vagrant/.ssh
|
||||
|
||||
sed -i -e 's/^#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
|
||||
sed -i -e 's/^AllowTcpForwarding no//' /etc/ssh/sshd_config
|
||||
sed -i -e 's/^PermitTunnel no//' /etc/ssh/sshd_config
|
||||
sed -i -e 's/^MaxSessions 1//' /etc/ssh/sshd_config
|
||||
|
||||
# disable password expiration
|
||||
for uid in root vagrant; do
|
||||
chage -I -1 -E -1 -m 0 -M -1 $uid
|
||||
done
|
Reference in New Issue
Block a user