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

Add document to help getting started with development #67

Merged

Conversation

hogepodge
Copy link
Contributor

@hogepodge hogepodge commented Mar 28, 2018

What this PR does / why we need it:

This PR outlines basic requirements for setting up a development environment for cloud-provider-openstack

Which issue(s) this PR fixes:
Fixes #20

Special notes for your reviewer:

Advice on making this more widely usable, based on your own experiences, are welcome.

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 28, 2018
@hogepodge
Copy link
Contributor Author

/assign @dims

cd ~
git clond https://github.com/kubernetes/kubernetes
cd kubernetes
make
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it really work with make? I am using ./build/run.sh make && cd cluster/images/hyperkube && make push VERSION=dev ARCH=amd64


```
cd ~
git clone https://github.com/kubnernetes/cloud-provider-openstack
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when compiling golang, the directory structure is important. For me this does not look like its correct if you just clone it to current default directory?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

You need to export GOPATH as well and use k8s.io instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plus there is typo kubnernetes

@@ -0,0 +1,199 @@
# Getting Started with Cloud Provider OpenStack Development

This guide will help you get started with building a development environment for you
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about This guide will help you build and run a single node Kubernetes cluster with the OpenStack Cloud Provider enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit of both. It's not just about running the code, but about having it available to develop and test against. We don't have any functional tests enabled, and this is part of the path towards getting those set up.


The specific values you use will vary based on your particular environment. You may
notice that several values are aliases of one another. This is in part because the
values expected by the OpenStack client and [Gopher Cloud]() are slightly different,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing link for Gophercloud project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely a missing link.


```
cd ~
git clone https://github.com/kubnernetes/cloud-provider-openstack
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

You need to export GOPATH as well and use k8s.io instead.

@hogepodge hogepodge force-pushed the getting-started-provider-dev branch from b130eb5 to 6074b31 Compare March 29, 2018 17:20
export GOPATH=$HOME/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export user={your github profile name}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USER right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah never mind, this is just for snippet below

export working_dir=$GOPATH/src/k8s.io
```

With your environment variables set up, clone the forks into your go environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we tell them earlier to fork cloud-provider-openstack and kubernetes repos?

cd $working_dir
git clone https://github.com/{user}/kubernetes
cd kubernetes
make
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this actually build? the following may work better to build-all-the-things

export KUBE_FASTBUILD=true
make cross

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://github.com/kubernetes/kubernetes/tree/master/build#key-scripts make will build only the linux binaries.
AFAIK running make cross with KUBE_FASTBUILD=true on a linux platform should do the same.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to create env with this guide but nothing happens when i run 'make', i need to run 'make build' then binaries are build.

domain-id=<domain_id>
```

Start your cluster with the `hack/local-up.sh` with the proper environment variable set to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hack/local-up-cluster.sh


To run the OpenStack provider, integrated with your cloud, be sure to have sourced the
environment variables. You will also need to create an `/etc/kubernetes/cloud-config` file
with the minimum options:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can throw the url for the configuration options here too https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#cloudconf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That document is going away, and we should be hosting it in this repository.

@dims
Copy link
Member

dims commented Apr 25, 2018

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2018
@kiwik
Copy link
Contributor

kiwik commented Jun 7, 2018

/test cloud-provider-openstack-acceptance-test-e2e-conformance-stable-branch-v1.10

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jun 7, 2018

Build succeeded.

```
GO_VERSION=1.10
GO_ARCH=linux-amd64
curl -o go.tgz https://dl.google.com/go/go$(GO_VERSION).$(GO_ARCH).tar.gz

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line should be
curl -o go.tgz https://dl.google.com/go/go${GO_VERSION}.${GO_ARCH}.tar.gz ?

enable the external cloud provider:

```
export EXTERNAL_CLOUD_PROVIDER_BINARY=$GOPATH/src/git.openstack.org/openstack/openstack-cloud-controller-manager/openstack-cloud-controller-manager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to set
export EXTERNAL_CLOUD_PROVIDER_BINARY=$GOPATH/src/k8s.io/cloud-provider-openstack/openstack-cloud-controller-manager

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 3, 2018
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 3, 2018
@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@hogepodge hogepodge force-pushed the getting-started-provider-dev branch from 8297540 to db7d665 Compare July 3, 2018 20:23
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 3, 2018
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 3, 2018
@hogepodge hogepodge force-pushed the getting-started-provider-dev branch from db7d665 to f552975 Compare July 3, 2018 20:25
@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@dims
Copy link
Member

dims commented Jul 3, 2018

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 3, 2018
@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 3, 2018

Build succeeded.

@dims
Copy link
Member

dims commented Jul 18, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 18, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2018
@k8s-ci-robot k8s-ci-robot merged commit 576a02f into kubernetes:master Jul 18, 2018
jsafrane pushed a commit to jsafrane/cloud-provider-openstack that referenced this pull request Aug 23, 2021
powellchristoph pushed a commit to powellchristoph/cloud-provider-openstack that referenced this pull request Jan 19, 2022
…der-dev

Add document to help getting started with development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to run openstack-cloud-controller-manager with hack/local-up-cluster.sh
9 participants