When I download the ZiTi source code and going to do the local Install, it shows the following error:
:~/Desktop/ziti-0.27.5$ go install ./ziti
go: downloading github.com/michaelquigley/pfxlog v0.6.9
go: downloading github.com/openziti/transport/v2 v2.0.51
...
...
(a lot of downloading)
...
...
go: downloading github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f
go install github.com/openziti/ziti/ziti: mkdir /home/saumya: permission denied
:~/Desktop/ziti-0.27.5$ ziti version
bash: ziti: command not found
:~/Desktop/ziti-0.27.5$ go build -o ./build/ziti ./ziti/
:~/Desktop/ziti-0.27.5$ ./build/ziti version
NAME VERSION
ziti v0.27.5
ziti-controller not installed
ziti-prox-c not installed
ziti-router not installed
ziti-tunnel not installed
ziti-edge-tunnel not installed
:~/Desktop/ziti-0.27.5$ go work init
go work use .
go work use ../edge
go: directory /home/klabzhao/Desktop/edge does not exist
:~/Desktop/ziti-0.27.5$ cat go.work
go 1.19
use .
:~/Desktop/ziti-0.27.5$ mkdir -p ./db
:~/Desktop/ziti-0.27.5$ ZITI_HOME=. \
ZITI_CTRL_LISTENER_ADDRESS=127.0.0.1 \
ZITI_CTRL_EDGE_LISTENER_HOST_PORT=127.0.0.1:1280 \
ZITI_EDGE_CTRL_ADVERTISED_HOST_PORT=127.0.0.1:1280 \
ZITI_CTRL_IDENTITY_CERT=./etc/ca/intermediate/certs/ctrl-client.cert.pem \
ZITI_CTRL_IDENTITY_SERVER_CERT=./etc/ca/intermediate/certs/ctrl-server.cert.pem \
ZITI_CTRL_IDENTITY_KEY=./etc/ca/intermediate/private/ctrl.key.pem \
ZITI_CTRL_IDENTITY_CA=./etc/ca/intermediate/certs/ca-chain.cert.pem \
ZITI_SIGNING_CERT=./etc/ca/intermediate/certs/intermediate.cert.pem \
ZITI_SIGNING_KEY=./etc/ca/intermediate/private/intermediate.key.decrypted.pem \
ziti create config controller \
--output ./db/ctrl-config.yml
bash: : command not found
bash: ziti: command not found
:~/Desktop/ziti-0.27.5$ ls -a
. CHANGELOG.md db .gitattributes go.work RELEASING.md ziti-controller
.. changelogs doc .github LICENSE SECURITY.md ziti-fabric-test
ADOPTERS.md CODE_OF_CONDUCT.md .dockerignore .gitignore network-tests test ziti-router
build common docker-images go.mod quickstart version ziti-tunnel
BUILD.md CONTRIBUTING.md etc go.sum README.md ziti
I did all above following the instruction on 003-local-deploy.md and 002-local-dev.md. Some output look good, but some just not work out.
Is there any idea to fix ?
Hi @Nick, I moved this into a new topic. The output from ziti version is strange to me. I wouldn’t expect to see a version when built locally, i expect it to be 0.0.0.
Can you sum up what it is you’re having a challenge with? You are just looking to build things locally, right?
Then, I am not clear this line in the guide: "If you add ${GOPATH}/bin to your executable search ${PATH} then you may immediately run the newly-built binaries."
But, I still run the following :
:~/Desktop/ziti-0.27.5$ ziti version
bash: ziti: command not found
After this, it is the same with my previous situations.
I don't think we should be instructing you to install like that. Personally here is what I do;
git clone https://github.com/openziti/ziti.git
cd ziti
go build -o built ./...
after that you'll have a ziti binary in that folder and you can run it and it should show you v0.0.0:
root@8f41f9fa182a:/go/ziti# built/ziti version
NAME VERSION
ziti v0.0.0
ziti-controller not installed
ziti-prox-c not installed
ziti-router not installed
ziti-tunnel not installed
ziti-edge-tunnel not installed
As for this part of the guide:
“If you add ${GOPATH}/bin to your executable search ${PATH} then you may immediately run the newly-built binaries.”
That's just telling you that your built library can be put on your path. It's not vital.
Really it's just a few steps...
clone the repo
issue go build and output it to a known location
run the binary from the output location
Is that helpful? I'm going to put an issue in to rewrite 002-local-dev.md for simplicity...
Is there anything else you need help with? I'm happy to help you here as it makes senses and let it feed into any updates...
Thank you very much. Actually, I have few further questions.
Right now, I am going to read and understand the source code, because I want to modify and change some source code.
In this case, if I modify the source code, then I have to re-build and re-compile the source code again locally, right ?
Therefore, if I am going to compile it again, where should I start ?
Should I start from the guide file 002-local-dev.md" , and 003-local-deploy.md" ?
Or, there is other easy approach to re-compile ?
Maybe I am not familiar with the code.
But, I think one Ziti network can be considered as a “service” to another Ziti network. Then, we can attach a Ziti network to another. It can make the ZiTi network more flexible or re-scalable.
Now, I am reading the code and trying to modify the code is for this purpose.
If you have any idea, such as, it is possible or not possible to do it, I will really appropriate it.
And, everybody can share some idea and discussion.
What you’re describing is vague enough that it could cover a number of things. If you’re doing some research you could look into:
Bridging ziti networks. This would involve a bridge application which was a member of both networks, either as an edge client (which would be pretty straightforward) or as a modified router (hard to say exactly how this would work.
Multi-tenant ziti networks. This would involve a router mesh which could communicate with multiple controllers and handle traffic for them independently. This would actually be pretty straightforward until you get to nitty gritty, like making sure that reported metrics are segmented by network as well.