Skip to content

README: add create and deploy section#14

Merged
hongchaodeng merged 1 commit intooperator-framework:masterfrom
hongchaodeng:d
Feb 15, 2018
Merged

README: add create and deploy section#14
hongchaodeng merged 1 commit intooperator-framework:masterfrom
hongchaodeng:d

Conversation

@hongchaodeng
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread README.md Outdated

## Up and running

At this step we actually have a functional operator already. To see it, first build the binary and container:
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.

Maybe reword to something like:
At this point we are ready to build and deploy a functional operator. First build the binary and container image:

Comment thread README.md Outdated
Kubernetes deployment files will be generated under `deploy/play-operator`. Deploy operator to Kubernetes:

```
kubectl create -f deploy/play-operator/
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.

kubectl create -f deploy/play-operator/deployment.yaml?

I think about creating three files under deploy/play-operator/
crd.yaml : crd for PlayService
deployment.yaml : file for create play-operator
example_play.yaml : an example CR for PlayService

Copy link
Copy Markdown
Contributor Author

@hongchaodeng hongchaodeng Feb 15, 2018

Choose a reason for hiding this comment

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

crd.yaml and deployment.yaml files are needed and should be created together. That's why we -f the entire dir.

The example CR would better be in another directory since it is not related to operator deployment.

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.

maybe I am missing something. I assume that all deployment related stuff is under deploy/play-operator/ like the example/ we have for vault and etcd-operator.

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.

The deployment related stuff is about deploying the operator only.

For the vault and operators, we'd better organize them separately.

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.

that's fine with me. we can leave out the example_play.yaml for now. and get back to it later.

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.

Creating one file will be easier for distribution, but harder if you want to introspect or change the objects. What do you guys think we should do?

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.

Yeah. I think in one file is better. Let's make it operator.yaml.
Eventually, we will capture those deployment lifecycles in the sdk tool.

Comment thread README.md
kind: "PlayService"
metadata:
name: "example"
spec:
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.

maybe no spec section? since we haven't defined any spec.

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.

since we haven't defined any spec.

Can you make the default spec have a field replica?

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.

kk, i'll do that

Comment thread README.md
replica: 1
```

Once the CR is created, a new pod `example-box` will be created:
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.

maybe mentioning ngix pod? if that's we are aiming for. I am fine with the current one.

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.

Nginx, or busy loop, or just sleep.
Maybe modify this again once we have the implementation?

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.

kk, maybe add a TODO so we don't forget?

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.

This is minor detail.
Let's not add a TODO in README.

Comment thread README.md Outdated
example-box 2/2 Running 0 6d
```

This is a basic test that verifies everything works correctly. Next we are going to write business logic and do something more interesting.
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.

write business -> write the business

@fanminshi
Copy link
Copy Markdown
Contributor

lgtm

@fanminshi fanminshi mentioned this pull request Feb 15, 2018
21 tasks
@hongchaodeng
Copy link
Copy Markdown
Contributor Author

@robszumski @hasbro17 PTAL

@hasbro17
Copy link
Copy Markdown
Contributor

LGTM

@hongchaodeng hongchaodeng merged commit f1bef7a into operator-framework:master Feb 15, 2018
@hongchaodeng hongchaodeng deleted the d branch February 15, 2018 23:01
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

Successfully merging this pull request may close these issues.

4 participants