├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── .goreleaser.yml
├── Dockerfile
├── LICENSE
├── README.md
├── api
├── addresses.go
├── device_classes.go
├── error.go
├── groups.go
├── image.go
├── ks.go
├── options.go
├── pools.go
├── postconfig.go
├── users.go
└── version.go
├── config.example.json
├── config
└── config.go
├── crypto
└── main.go
├── db
└── main.go
├── dhcp.go
├── docs
├── docs.go
├── swagger.json
└── swagger.yaml
├── go.mod
├── go.sum
├── main.go
├── models
├── address.go
├── api.go
├── device_class.go
├── group.go
├── image.go
├── nullable_int.go
├── option.go
├── pool.go
└── user.go
├── secrets
└── main.go
├── serve.go
├── statik
└── statik.go
├── tftpd.go
├── web
├── .browserslistrc
├── .editorconfig
├── .gitignore
├── README.md
├── angular.json
├── e2e
│ ├── protractor.conf.js
│ ├── src
│ │ ├── app.e2e-spec.ts
│ │ └── app.po.ts
│ └── tsconfig.json
├── karma.conf.js
├── package-lock.json
├── package.json
├── src
│ ├── app
│ │ ├── api.service.spec.ts
│ │ ├── api.service.ts
│ │ ├── app-routing.module.ts
│ │ ├── app.component.html
│ │ ├── app.component.scss
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ ├── help
│ │ │ ├── help.component.html
│ │ │ ├── help.component.scss
│ │ │ ├── help.component.spec.ts
│ │ │ └── help.component.ts
│ │ ├── logs
│ │ │ ├── logs.component.html
│ │ │ ├── logs.component.scss
│ │ │ ├── logs.component.spec.ts
│ │ │ └── logs.component.ts
│ │ ├── manage-dhcp-pools
│ │ │ ├── manage-dhcp-pools.component.html
│ │ │ ├── manage-dhcp-pools.component.scss
│ │ │ ├── manage-dhcp-pools.component.spec.ts
│ │ │ └── manage-dhcp-pools.component.ts
│ │ ├── manage-groups
│ │ │ ├── manage-groups.component.html
│ │ │ ├── manage-groups.component.scss
│ │ │ ├── manage-groups.component.spec.ts
│ │ │ └── manage-groups.component.ts
│ │ ├── manage-images
│ │ │ ├── manage-images.component.html
│ │ │ ├── manage-images.component.scss
│ │ │ ├── manage-images.component.spec.ts
│ │ │ └── manage-images.component.ts
│ │ └── manage-users
│ │ │ ├── manage-users.component.html
│ │ │ ├── manage-users.component.scss
│ │ │ ├── manage-users.component.spec.ts
│ │ │ └── manage-users.component.ts
│ ├── assets
│ │ └── .gitkeep
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── favicon.ico
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── styles.scss
│ └── test.ts
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.spec.json
└── tslint.json
└── websockets
└── main.go
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: goreleaser
2 |
3 | on:
4 | push:
5 | tags:
6 | - '*'
7 |
8 | jobs:
9 | goreleaser:
10 | runs-on: ubuntu-latest
11 | steps:
12 | -
13 | name: Checkout
14 | uses: actions/checkout@v2
15 | -
16 | name: Unshallow
17 | run: git fetch --prune --unshallow
18 | -
19 | name: Set up Go
20 | uses: actions/setup-go@v2
21 | with:
22 | go-version: 1.15
23 | - uses: azure/docker-login@v1
24 | with:
25 | username: ${{ secrets.DOCKER_USERNAME }}
26 | password: ${{ secrets.DOCKER_PASSWORD }}
27 | -
28 | name: Run GoReleaser
29 | uses: goreleaser/goreleaser-action@v2
30 | with:
31 | version: latest
32 | args: release --rm-dist --skip-validate
33 | env:
34 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 |
8 | # Test binary, built with `go test -c`
9 | *.test
10 |
11 | # Output of the go coverage tool, specifically when used with LiteIDE
12 | *.out
13 |
14 | # Dependency directories (remove the comment below to include it)
15 | # vendor/
16 | tftp
17 | tftp/*
18 | *.db
19 | go-via
20 | database/sqlite-database*
21 | cert
22 | cert/*
23 | secret
24 | secret/*
25 | statik
26 | statik/statik.go
27 |
--------------------------------------------------------------------------------
/.goreleaser.yml:
--------------------------------------------------------------------------------
1 | before:
2 | hooks:
3 | - go get -v -d
4 | - go get -u github.com/swaggo/swag/cmd/swag
5 | - go generate ./...
6 | builds:
7 | - env:
8 | - CGO_ENABLED=1
9 | goos:
10 | - linux
11 | goarch:
12 | - amd64
13 | checksum:
14 | name_template: 'checksums.txt'
15 | snapshot:
16 | name_template: "{{ .Tag }}-next"
17 | changelog:
18 | sort: asc
19 | filters:
20 | exclude:
21 | - '^docs:'
22 | - '^test:'
23 | archives:
24 | -
25 | files:
26 | - config.example.json
27 | dockers:
28 | - ids:
29 | - go-via
30 | image_templates:
31 | - "docker.io/maxiepax/go-via:latest"
32 | build_flag_templates:
33 | - "--pull"
34 | - "--label=org.opencontainers.image.created={{.Date}}"
35 | - "--label=org.opencontainers.image.name={{.ProjectName}}"
36 | - "--label=org.opencontainers.image.revision={{.FullCommit}}"
37 | - "--label=org.opencontainers.image.version={{.Version}}"
38 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.16
2 |
3 | ADD go-via /usr/local/bin/go-via
4 |
5 | EXPOSE 8080
6 |
7 | ENTRYPOINT ["go-via"]
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Custom deployment tool for VMware ESXi Hypervisor
2 | =========================================
3 |
4 | Credits
5 | -------
6 |
7 | Massive credits go to one of my best friends, and mentor [Jonathan "stamp" G](https://www.github.com/stamp) for all the help, coaching and lessons during this project.
8 | Without your support this project would never have been a reality.
9 |
10 | VMware #clarity-ui channel for being super helpful with newbie questions about clarity!
11 |
12 |
13 | What is go-via?
14 | ---------------
15 | go-via is a single binary, that when executed performs the tasks of dhcpd, tftpd, httpd, and ks.cfg generator, with a angular front-end, and http-rest backend written in go, and sqlite for persisting.
16 |
17 | Why a new version of VMware Imaging Appliance?
18 | ----------------------------------------------
19 | The old version of VIA had some things it didn't support which made it hard to run in enterprise environments. go-via brings added support for the following.
20 | 1. IP-Helper , you can have the go-via binary running on any network you want and use [RFC 3046 IP-Helper](https://tools.ietf.org/html/rfc3046) to relay DHCP requests to the server.
21 | 2. UEFI , go-via does not support BIOS, but does support UEFI and secure-boot. BIOS may be added in the future.
22 | 3. Virtual environments, it does not block nested esxi host deployment.
23 | 4. HTTP-REST, everything you can do in the UI, you can do via automation also.
24 | 5. Options to perform all prerequisites for VMware Cloud Foundation 4.x/5.x
25 |
26 | Supported Architectures
27 | -----------------------
28 | UEFI x86_64 INTEL/AMD architecture
29 | UEFI arm_64 ARM architecture (including Project Monterey/SmartNICs)
30 |
31 | Default username / password / port
32 | ----------------------
33 | username: admin
34 | password: VMware1!
35 | port: 8443
36 |
37 | Installation / Running
38 | ----------------------
39 |
# Accept the VMware End User License Agreement
127 | vmaccepteula
128 |
129 | # Set the root password for the DCUI and Tech Support Mode
130 | rootpw {{ .password }}
131 |
132 | {{ if .erasedisks }}
133 | # Remove ALL partitions
134 | clearpart --overwritevmfs --alldrives {{ end }}
135 |
136 | {{ if .bootdisk }}
137 | install --disk=/vmfs/devices/disks/{{.bootdisk}} --overwritevmfs --novmfsondisk
138 | {{ else }}
139 | # Install on the first local disk available on machine
140 | install --overwritevmfs {{ if not .createvmfs }} --novmfsondisk {{ end }} --firstdisk="localesx,usb,ahci,vmw_ahci,VMware"
141 | {{ end }}
142 |
143 | # Set the network to static on the first network adapter
144 | network --bootproto=static --ip={{ .ip }} --gateway={{ .gateway }} --netmask={{ .netmask }} --nameserver={{ .dns }} --hostname={{ .hostname }} --device={{ .mac }} {{if .vlan}} --vlanid={{.vlan}} {{end}}
145 |
146 | reboot
3 | Please configure an ip-scope that the VIA service will offer bare metal 4 | provisioning to. 5 |
6 | 7 | 8 |Host groups are used to organize your hosts into groups that share the same image and configuration properties. This 3 | saves you time by being able to organize all hosts that will look the same, and simply configure the group with 4 | properties.
5 | 6 | 7 |3 | go-via uses BasicAuth, all users added are by default Admin. 4 |
5 | 6 | 7 | 8 |