## Summary of the text:
This document explains how to build a private cloud using TiUP and how to use the `mirror` command for this purpose.
**Key Points:**
* By default, TiUP does not allow access to the official mirror due to being isolated in a private network.
* To build a private cloud, users can use the `mirror` command to create a local mirror of the TiUP repository.
* This can be useful for offline deployments.
* The `mirror` command allows users to manage various components, including keys, users, and versions of components or the repository itself.
* It also provides several commands for managing published components, such as `init`, `clone`, `merge`, and `set`.
**Instructions:**
1. **Create a private repository:** Use the `tiup mirror init` command to create an empty repository on the local machine.
2. **Create a local mirror:** Use the `tiup mirror clone` command to create a local mirror of the TiUP repository.
3. **Manage components:** Use the various `mirror` commands to manage components, such as `genkey`, `set`, `merge`, and `grant`.
4. **Build a custom repository:** Use the `tiup package` command to create a custom package containing the TiDB components.
5. **Create a custom component:** Use the `tiup mirror create` command to create a new custom component from scratch.
6. **Upload the component to TiUP:** Use the `tiup mirror publish` command to upload the custom component to the TiUP repository.
7. **Merge a custom component:** Use the `tiup mirror merge` command to merge a custom component into an existing repository.
**Additional Notes:**
* Always reset the private repository before creating a new mirror or merging components.
* Use the `TIUP_MIRRORS` environment variable to specify the path to the local mirror directory.
* This guide assumes you have basic command-line skills.
**Overall, this document provides a comprehensive overview of using the `mirror` command with the TiUP repository for building and managing private clouds.**
The `mirror` command is used to manage a component repository for TiUP, you can use it to create a private repository, or to add new component to an existing repository. The repository can be used either online or offline. It also provides some useful utilities to help manage keys, users, and versions of components or the repository itself. Usage: tiup mirror <command> [flags] Available Commands: init Initialize an empty repository sign Add signatures to a manifest file genkey Generate a new key pair clone Clone a local mirror from remote mirror and download all selected components merge Merge two or more offline mirrors publish Publish a component show Show the mirror address set Set mirror address modify Modify published component renew Renew the manifest of a published component. grant grant a new owner rotate Rotate root.json Flags: -h, --help help for mirror --repo string Path to the repository Global Flags: --help Help for this command Use "tiup mirror [command] --help" for more information about a command.
The component `hello` version is not installed; downloading from repository. Starting component `hello`: /home/dvaneeden/.tiup/components/hello/v0.0.1/hello hello