Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need some help getting started #200

Open
senare opened this issue Oct 17, 2023 · 6 comments
Open

Need some help getting started #200

senare opened this issue Oct 17, 2023 · 6 comments

Comments

@senare
Copy link

senare commented Oct 17, 2023

Hi

I tried and failed to branch / build / publish / install / test .. this crossplane provider ...

I have gotten the hang of the using part and installing the released provider.

However there seams to be a some part of of setup to run / build this local that I am missing

For some ctx, I am using M1 mac as daily driver. However i spun of a Ubuntu 22.04 as dev environment using multipass

I fork repo and and run 'make'

go build seams fine ...

make test, looks oki!

if I check docker image

$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
build-10484da4/provider-terraform-arm64 latest 1063824d22ee 5 hours ago 131MB

however now I would like to do a amd64 build and publish to a private repo so I can test deploy ?

Are there any instructions for this ?

@ytsarev
Copy link
Member

ytsarev commented Oct 18, 2023

You can follow installation instructions at https://marketplace.upbound.io/providers/upbound/provider-terraform/v0.10.0 from the Marketplace. It should provide a consistent packaging experience instead of building from the local git

@senare
Copy link
Author

senare commented Oct 19, 2023

Yes, so far so good!

But that only allows me to deploy what have already been released, and wont help me if I want to deploy and test my changes or some other changes (i.e. #74) ?

@ytsarev
Copy link
Member

ytsarev commented Oct 19, 2023

make run(running binary locally) and make e2e(deploying Provider package to the local cluster) targets can help with local testing without dependency on local registries.

@senare
Copy link
Author

senare commented Oct 19, 2023

So I can run the test and go build etc ...
and I have a test-cluster i want to try the provider in ...
and I have a private docker registry I can use ...

I just can't figure out how to make the 'build script' publish to my local registry instead ...

@ytsarev
Copy link
Member

ytsarev commented Oct 19, 2023

DOCKER_REGISTRY=xpkg.upbound.io/upbound/provider-terraform-staging make publish

something like that with your repo URL instead

@senare
Copy link
Author

senare commented Oct 19, 2023

Sry I must be dumb...

$ PLATFORM=linux_amd64 make

Works and I get an image for amd64, i think ...

REPOSITORY TAG IMAGE ID CREATED SIZE
build-10484da4/provider-terraform-amd64 latest 3b377f9ac544 37 seconds ago 132MB
build-10484da4/provider-terraform-arm64 latest 64dfed450a07 4 minutes ago 131MB

however this still fails ?

$ PLATFORM=linux_amd64 DOCKER_REGISTRY=registry.company.dev/upbound/provider-terraform-staging make publish

19:08:45 [ .. ] Skipping image publish for xpkg.upbound.io/upbound/provider-terraform:v0.0.0-342.g9a22e93
Publish is deferred to xpkg machinery
19:08:45 [ OK ] Image publish skipped for xpkg.upbound.io/upbound/provider-terraform:v0.0.0-342.g9a22e93
19:08:45 [ .. ] Pushing package xpkg.upbound.io/upbound/provider-terraform:v0.0.0-342.g9a22e93
up: error: POST https://xpkg.upbound.io/v2/upbound/provider-terraform/blobs/uploads/: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:upbound/provider-terraform Type:repository] map[Action:push Class: Name:upbound/provider-terraform Type:repository]]
19:08:49 [FAIL]
make[1]: *** [build/makelib/xpkg.mk:105: xpkg.release.publish.xpkg.upbound.io/upbound.provider-terraform] Error 1
make: *** [build/makelib/common.mk:411: publish] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants