Skip to content

docs: add prerequisites, examples, and release info to locks tutorial#1121

Open
akshatj536 wants to merge 1 commit intoetcd-io:mainfrom
akshatj536:improve-locks-doc
Open

docs: add prerequisites, examples, and release info to locks tutorial#1121
akshatj536 wants to merge 1 commit intoetcd-io:mainfrom
akshatj536:improve-locks-doc

Conversation

@akshatj536
Copy link

Summary

Adds missing prerequisites, command execution example, and lock release documentation to the locks tutorial.

Changes

  • Added cluster setup prerequisite
  • Added command execution example with auto-release
  • Documented three lock release methods
  • Added default values to --endpoints and --ttl options

Context

Addresses part of #794 by filling straightforward documentation gaps. Further improvements (multi-client examples, detailed mechanics) will follow in subsequent PRs.

Testing

  • Tested locally with npm run serve
  • Verified markdown and links render correctly

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akshatj536
Once this PR has been reviewed and has the lgtm label, please assign jberkus for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link

Hi @akshatj536. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

Signed-off-by: Akshat Jain <akshat2510jain@gmail.com>

### Visual demonstration

![08_etcdctl_lock_2016050501](https://storage.googleapis.com/etcd/demo/08_etcdctl_lock_2016050501.gif)
Copy link
Contributor

Choose a reason for hiding this comment

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

In general, we don't recommend using GIF formats due to issues with maintainability, large file sizes, and lack of accessibility. Could you please consider explaining the guidance thoroughly in the written content first, and removing the GIF from this section?

@wendy-ha18
Copy link
Contributor

I’ll loop in @ronaldngounou for review since he worked on improving this guidance before.

Hi Ronald, could you please help review this PR when you have time? Thank you.

Comment on lines -20 to +27
etcdctl --endpoints=$ENDPOINTS lock mutex1
etcdctl --endpoints=$ENDPOINTS lock mutex1 echo "Lock acquired"
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, this example is wrong, because the original tutorial is wrong. For this form of the lock, you need to actually send etcd a command, like updating a key.

## Prerequisites

* Install [`etcd` and `etcdctl`](https://etcd.io/docs/v3.6/install/)
* A running etcd cluster (see [How to Set Up a Demo etcd Cluster](/docs/v3.6/tasks/operator/how-to-setup-cluster/))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to see more here for setup. For example, the user will need to have multiple, separate shell sessions with etcdctl clients in order to try this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants