VMware vSphere Integrated Containers provider (#206)

* Add Virtual Kubelet provider for VIC

Initial virtual kubelet provider for VMware VIC.  This provider currently
handles creating and starting of a pod VM via the VIC portlayer and persona
server.  Image store handling via the VIC persona server.  This provider
currently requires the feature/wolfpack branch of VIC.

* Added pod stop and delete.  Also added node capacity.

Added the ability to stop and delete pod VMs via VIC.  Also retrieve
node capacity information from the VCH.

* Cleanup and readme file

Some file clean up and added a Readme.md markdown file for the VIC
provider.

* Cleaned up errors, added function comments, moved operation code

1. Cleaned up error handling.  Set standard for creating errors.
2. Added method prototype comments for all interface functions.
3. Moved PodCreator, PodStarter, PodStopper, and PodDeleter to a new folder.

* Add mocking code and unit tests for podcache, podcreator, and podstarter

Used the unit test framework used in VIC to handle assertions in the provider's
unit test.  Mocking code generated using OSS project mockery, which is compatible
with the testify assertion framework.

* Vendored packages for the VIC provider

Requires feature/wolfpack branch of VIC and a few specific commit sha of
projects used within VIC.

* Implementation of POD Stopper and Deleter unit tests (#4)

* Updated files for initial PR
This commit is contained in:
Loc Nguyen
2018-06-04 15:41:32 -07:00
committed by Ria Bhatia
parent 98a111e8b7
commit 513cebe7b7
6296 changed files with 1123685 additions and 8 deletions

63
vendor/github.com/vmware/vic/isos/vicadmin/auth.html generated vendored Normal file
View File

@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html itemscope="" itemtype="http://schema.org/Organization" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VCH Admin</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Styles -->
<link rel="stylesheet" href="css/clarity-ui.min.css">
<link rel="stylesheet" href="css/fontello.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body id="body" class="page-community layout-community">
<div class="main-nav">
<header class="header">
<div class="branding">
<a href="http://www.vmware.com"><img src="images/vmw-logo.svg" class="logo"></a>
<span class="title">vSphere Integrated Containers</span>
</div>
<a role="button" class="github btn btn-primary" href="http://www.github.com/vmware/vic">
<i class="icon-github-circled" style="vertical-align: middle;"></i>
View on Github
</a>
</header>
</div>
<div class="main-container">
<main class="content-area">
<section>
<div class="row ">
<div class="col-md-6 center">
<div class="card card-block text-xs-center">
<h2 class="card-title">{{.Hostname}} Login</h2>
<h3 class="error-message"> {{.InvalidLogin}}</h3>
<form method="post">
<label for="username">vSphere or ESXi Username:</label>
<input type="text" name="username" autofocus><br />
<label for="password">vSphere or ESXi Password:</label>
<input type="password" name="password" autocomplete="off"><br /><br/>
<input type="submit" value="Log in">
</form>
</div>
<div class="card card-block text-xs-center">
<p class="card-text">Appliance System Time: {{.SystemTime}}</p>
</div>
</div>
</div>
</section>
</main>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

61
vendor/github.com/vmware/vic/isos/vicadmin/css/fontello.css generated vendored Executable file
View File

@@ -0,0 +1,61 @@
@font-face {
font-family: 'fontello';
src: url('/fonts/fontello.eot?26878433');
src: url('/fonts/fontello.eot?26878433#iefix') format('embedded-opentype'),
url('/fonts/fontello.woff2?26878433') format('woff2'),
url('/fonts/fontello.woff?26878433') format('woff'),
url('/fonts/fontello.ttf?26878433') format('truetype'),
url('/fonts/fontello.svg?26878433#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windows. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('/fonts/fontello.svg?26878433#fontello') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-ok:before { content: '\e800'; } /* '' */
.icon-attention:before { content: '\e801'; } /* '' */
.icon-github-circled:before { content: '\f09b'; } /* '' */
.icon-logout:before { content: '\f08b'; }

View File

@@ -0,0 +1,22 @@
.main-nav .header {background-color: #004A70;}
.header .github {position: absolute; right:18px; top:6px;}
.header .logout {position: absolute; right:210px; top:6px}
.header .icon-github-circled {font-size:20px}
.header .icon-logout {font-size:20px}
section {width: 100%; padding-left: 24px; padding-right: 24px; max-width: 1056px; margin: 0 auto; padding-top: 24px;}
.community-top-section {padding-top: 0;}
.card .row {margin:0 18px 10px;}
.sixty {width:60%; margin-right:5px;}
.forty {width:35%;}
.center{ float:none; margin-left:auto; margin-right:auto;}
.right {float:right; margin-right:18px;}
li .right {margin-right:120px}
.icon-ok {color:#62A420;}
.icon-attention {color:#EB8D00;}
.error-message {color:#c92100; font-size:12px; line-height:12px; display:block; margin-bottom:8px;}
form {padding-top:0;}

View File

@@ -0,0 +1,130 @@
<!DOCTYPE html>
<!-- saved from url=(0030)http://10.20.232.35/community/ -->
<html itemscope="" itemtype="http://schema.org/Organization" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VIC: {{.Hostname}}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Styles -->
<link rel="stylesheet" href="css/clarity-ui.min.css">
<link rel="stylesheet" href="css/fontello.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body id="body" class="page-community layout-community">
<div class="main-nav">
<header class="header">
<div class="branding">
<a href="http://www.vmware.com"><img src="images/vmw-logo.svg" class="logo"></a>
<span class="title">vSphere Integrated Containers</span>
</div>
<a role="button" class="github btn btn-primary" href="http://www.github.com/vmware/vic">
<i class="icon-github-circled" style="vertical-align: middle;"></i>
View on Github
</a>
<a role="button" class="logout btn btn-primary" href="/logout">
Log Out
</a>
</header>
</div>
<div class="main-container">
<main class="content-area">
<section class="community-top-section">
<h1 id="community">Admin Portal for {{.Hostname}} </h1>
<h4 id="community">{{.Version}}</h4>
</section>
<section>
<div class="row">
<div class="col-md-6">
<div class="card card-block">
<h3 class="card-title">Status</h3>
<div class="row">
<div class="sixty">Virtual Container Host (VCH){{.VCHIssues}}</div>
<div class="forty">{{.VCHStatus}}</div>
</div>
<div class="row">
<div class="sixty">Registry and Internet Connectivity{{.NetworkIssues}}</div>
<div class="forty">{{.NetworkStatus}}</div>
</div>
{{if .VCHReachable}}
<div class="row">
<div class="sixty">Firewall{{.FirewallIssues}}</div>
<div class="forty">{{.FirewallStatus}}</div>
</div>
<div class="row">
<div class="sixty">License{{.LicenseIssues}}</div>
<div class="forty">{{.LicenseStatus}}</div>
</div>
{{end}}
</div>
<div class="card card-block">
<h3 class="card-title">Virtual Container Host Info</h3>
<p class="card-text">Docker Endpoint: {{.HostIP}}:{{.DockerPort}}</p>
<p class="card-text">System Time: {{.SystemTime}}</p>
{{.StorageRemaining}}
</div>
</div>
<div class="col-md-6">
<div class="card card-block">
<h3 class="card-title">Logs</h3>
<div class="row">
<div class="sixty"><a href="/logs.zip">Log Bundle</a></div>
</div>
{{if .VCHReachable}}
<div class="row">
<div class="sixty"><a href="/container-logs.zip">Log Bundle with container logs</a></div>
</div>
<div class="row">
<div class="sixty"><a href="/logs/docker-personality.log">Docker Personality</a></div>
<div class="forty"><a href="/logs/tail/docker-personality.log">Live Log</a></div>
</div>
<div class="row">
<div class="sixty"><a href="/logs/port-layer.log">Port Layer Service</a></div>
<div class="forty"><a href="/logs/tail/port-layer.log">Live Log</a></div>
</div>
<div class="row">
<div class="sixty"><a href="/logs/init.log">Initialization & watchdog</a></div>
<div class="forty"><a href="/logs/tail/init.log">Live Log</a></div>
</div>
<div class="row">
<div class="sixty"><a href="/logs/vicadmin.log">Admin Server</a></div>
<div class="forty"><a href="/logs/tail/vicadmin.log">Live Log</a></div>
</div>
<div class="row">
<div class="sixty"><a href="/logs/kubelet-starter.log">Kubelet Starter</a></div>
<div class="forty"><a href="/logs/tail/kubelet-starter.log">Live Log</a></div>
</div>
<div class="row">
<div class="sixty"><a href="/logs/virtual-kubelet.log">Virtual Kubelet</a></div>
<div class="forty"><a href="/logs/tail/virtual-kubelet.log">Live Log</a></div>
</div>
{{else}}
<div class="row">
<div class="sixty">
<span class="error-message">Other logs are unavailable due to vSphere connection issues.
Please see the log bundle and
<a href="https://vmware.github.io/vic/assets/files/html/vic_admin/vicadmin_status_ref.html">documentation</a>
to troubleshoot the issue.
</span>
</div>
</div>
{{end}}
</div>
</div>
</div>
</section>
</main>
</div>
</body>
</html>

BIN
vendor/github.com/vmware/vic/isos/vicadmin/fonts/fontello.eot generated vendored Executable file

Binary file not shown.

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="ok" unicode="&#xe800;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
<glyph glyph-name="attention" unicode="&#xe801;" d="M571 83v106q0 8-5 13t-12 5h-108q-7 0-12-5t-5-13v-106q0-8 5-13t12-6h108q7 0 12 6t5 13z m-1 208l10 257q0 6-5 10-7 6-14 6h-122q-6 0-14-6-5-4-5-12l9-255q0-5 6-9t13-3h103q8 0 14 3t5 9z m-7 522l428-786q20-35-1-70-9-17-26-26t-35-10h-858q-18 0-35 10t-26 26q-21 35-1 70l429 786q9 17 26 27t36 10 36-10 27-27z" horiz-adv-x="1000" />
<glyph glyph-name="github-circled" unicode="&#xf09b;" d="M429 779q116 0 215-58t156-156 57-215q0-140-82-252t-211-155q-15-3-22 4t-7 17q0 1 0 43t0 75q0 54-29 79 32 3 57 10t53 22 45 37 30 58 11 84q0 67-44 115 21 51-4 114-16 5-46-6t-51-25l-21-13q-52 15-107 15t-108-15q-8 6-23 15t-47 22-47 7q-25-63-5-114-44-48-44-115 0-47 12-83t29-59 45-37 52-22 57-10q-21-20-27-58-12-5-25-8t-32-3-36 12-31 35q-11 18-27 29t-28 14l-11 1q-12 0-16-2t-3-7 5-8 7-6l4-3q12-6 24-21t18-29l6-13q7-21 24-34t37-17 39-3 31 1l13 3q0-22 0-50t1-30q0-10-8-17t-22-4q-129 43-211 155t-82 252q0 117 58 215t155 156 216 58z m-267-616q2 4-3 7-6 1-8-1-1-4 4-7 5-3 7 1z m18-19q4 3-1 9-6 5-9 2-4-3 1-9 5-6 9-2z m16-25q6 4 0 11-4 7-9 3-5-3 0-10t9-4z m24-23q4 4-2 10-7 7-11 2-5-5 2-11 6-6 11-1z m32-14q1 6-8 9-8 2-10-4t7-9q8-3 11 4z m35-3q0 7-10 6-9 0-9-6 0-7 10-6 9 0 9 6z m32 5q-1 7-10 5-9-1-8-8t10-4 8 7z" horiz-adv-x="857.1" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
vendor/github.com/vmware/vic/isos/vicadmin/fonts/fontello.ttf generated vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="37px" height="36px" viewBox="0 0 37 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>vm bug</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Headers" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="CL-Headers-Specs" transform="translate(-262.000000, -175.000000)">
<g id="01" transform="translate(238.000000, 163.000000)">
<g id="vm-bug" transform="translate(24.703125, 12.000000)">
<rect id="Rectangle-42" fill-opacity="0.25" fill="#DDDDDD" opacity="0.6" x="0" y="0" width="36" height="36" rx="3"></rect>
<path d="M7.63948376,13.8762402 C7.32265324,13.2097082 6.53978152,12.9085139 5.80923042,13.219934 C5.07771043,13.5322837 4.80932495,14.3103691 5.13972007,14.9769011 L8.20725954,21.3744923 C8.68977207,22.3784735 9.19844491,22.9037044 10.1528121,22.9037044 C11.1720955,22.9037044 11.6168209,22.3310633 12.0983646,21.3744923 C12.0983646,21.3744923 14.7744682,15.7847341 14.8015974,15.7261685 C14.8287266,15.6666733 14.9149588,15.4863286 15.1872199,15.4872582 C15.4178182,15.490047 15.6106294,15.6657437 15.6106294,15.9018652 L15.6106294,21.3698443 C15.6106294,22.212073 16.0979865,22.9037044 17.0349134,22.9037044 C17.9718403,22.9037044 18.4785754,22.212073 18.4785754,21.3698443 L18.4785754,16.8965503 C18.4785754,16.0338702 19.1219254,15.4742436 20.0007183,15.4742436 C20.8785423,15.4742436 21.4637583,16.0524624 21.4637583,16.8965503 L21.4637583,21.3698443 C21.4637583,22.212073 21.9520842,22.9037044 22.8880423,22.9037044 C23.8240003,22.9037044 24.3326731,22.212073 24.3326731,21.3698443 L24.3326731,16.8965503 C24.3326731,16.0338702 24.9750543,15.4742436 25.8538472,15.4742436 C26.7307023,15.4742436 27.3168871,16.0524624 27.3168871,16.8965503 L27.3168871,21.3698443 C27.3168871,22.212073 27.8052131,22.9037044 28.74214,22.9037044 C29.6771291,22.9037044 30.1848331,22.212073 30.1848331,21.3698443 L30.1848331,16.2783582 C30.1848331,14.4070488 28.6181207,13.0962956 26.7307023,13.0962956 C24.8452216,13.0962956 23.6651006,14.3475536 23.6651006,14.3475536 C23.037253,13.5666793 22.1720247,13.0972252 20.7089847,13.0972252 C19.164557,13.0972252 17.8129406,14.3475536 17.8129406,14.3475536 C17.1841241,13.5666793 16.1154267,13.0972252 15.2308204,13.0972252 C13.8617638,13.0972252 12.7746572,13.675444 12.1119292,15.1302871 L10.1528121,19.5608189 L7.63948376,13.8762402" id="Fill-4" fill="#FFFFFF"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB