Skip to content

Add document to help getting started with development#67

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
hogepodge:getting-started-provider-dev
Jul 18, 2018
Merged

Add document to help getting started with development#67
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
hogepodge:getting-started-provider-dev

Conversation

@hogepodge
Copy link
Copy Markdown
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 requested review from dixudx and zetaab March 28, 2018 22:46
@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
Copy Markdown
Contributor Author

/assign @dims

Comment thread docs/getting-started-provider-dev.md Outdated
cd ~
git clond https://github.com/kubernetes/kubernetes
cd kubernetes
make
Copy link
Copy Markdown
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

Comment thread docs/getting-started-provider-dev.md Outdated

```
cd ~
git clone https://github.com/kubnernetes/cloud-provider-openstack
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread docs/getting-started-provider-dev.md Outdated

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
Copy Markdown
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
Copy Markdown
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.

Comment thread docs/getting-started-provider-dev.md Outdated

```
cd ~
git clone https://github.com/kubnernetes/cloud-provider-openstack
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?

Comment thread docs/getting-started-provider-dev.md Outdated
cd $working_dir
git clone https://github.com/{user}/kubernetes
cd kubernetes
make
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread docs/getting-started-provider-dev.md Outdated
domain-id=<domain_id>
```

Start your cluster with the `hack/local-up.sh` with the proper environment variable set to
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

kiwik commented Jun 7, 2018

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

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jun 7, 2018

Build succeeded.

Comment thread docs/getting-started-provider-dev.md Outdated
```
GO_VERSION=1.10
GO_ARCH=linux-amd64
curl -o go.tgz https://dl.google.com/go/go$(GO_VERSION).$(GO_ARCH).tar.gz
Copy link
Copy Markdown

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 ?

Comment thread docs/getting-started-provider-dev.md Outdated
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
Copy Markdown
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
Copy Markdown
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.


Details

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
Copy Markdown

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
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@dims
Copy link
Copy Markdown
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
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2018

Build succeeded.

@dims
Copy link
Copy Markdown
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
Copy Markdown
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

Details 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