mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
docs: new docs about Chef Server setup: in general and on AWS
This commit is contained in:
parent
1c8c65ee1a
commit
a9138dfa7c
BIN
docs/source/_static/chef_server_AMI.png
Normal file
BIN
docs/source/_static/chef_server_AMI.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
@ -12,6 +12,6 @@ In a production environment, a BigchainDB node can have several other components
|
||||
* nginx or similar, as a reverse proxy and/or load balancer for the web server
|
||||
* An NTP daemon running on all machines running BigchainDB code, and possibly other machines
|
||||
* A RethinkDB proxy server
|
||||
* Scalable storage for RethinkDB (e.g. using RAID)
|
||||
* Monitoring software, to monitor all the machines in the node
|
||||
* Maybe more, e.g. a configuration management server and agents on all machines
|
||||
|
||||
* Maybe a configuration management (CM) server and CM agents on all machines
|
||||
|
@ -1,10 +1,10 @@
|
||||
.. You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Production Node Setup & Management
|
||||
==================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
overview
|
||||
setup-chef-server-general
|
||||
setup-chef-server-aws
|
||||
install-chef-dk
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Install Chef Dev Kit
|
||||
# Tips to Install the Chef Dev Kit
|
||||
|
||||
TODO
|
||||
The Chef Development Kit (often written Chef DK or ChefDK) is something you install on the workstation that you intend to use for deploying and managing a BigchainDB production node. It can be installed on Windows, Mac OS X, and many Linux distributions.
|
||||
|
||||
The official Chef documentation has [a page about installing Chef DK](https://docs.chef.io/install_dk.html), so we recommend you follow that.
|
||||
|
||||
Coming soon: tips for instaling Chef DK on Ubuntu.
|
||||
|
19
docs/source/prod-node-setup-mgmt/overview.md
Normal file
19
docs/source/prod-node-setup-mgmt/overview.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Overview
|
||||
|
||||
Deploying and managing a production BigchainDB node is much more involved than working with a dev/test node:
|
||||
|
||||
* There are more components in a production node; see [the page about node components](../nodes/node-components.html)
|
||||
* Production nodes need more security
|
||||
* Production nodes need monitoring
|
||||
* Production nodes need maintenance, e.g. software upgrades, scaling
|
||||
|
||||
Thankfully, there are tools to help!
|
||||
|
||||
[Chef](https://www.chef.io/chef/) is a tool to provision machines, install software on those machines, manage the state of those machines, and more. (When we say "machines," we mean bare-metal servers, virtual machines or containers.)
|
||||
BigchainDB node operators can use Chef (and related tools) to set up and manage the machines associated with their nodes.
|
||||
|
||||
A note about terminology: In the world of Chef, a "node" is what we call a machine. In other words, a "BigchainDB node" may contain several "Chef nodes."
|
||||
|
||||
Before you can deploy a production node, you have to know where the machines will be hosted, e.g. AWS, Azure, Cloud Provider X, or your corporate datacenter. You will need an account with that host so that you can provision machines there.
|
||||
|
||||
The next step is to provision a machine and install Chef server on it.
|
87
docs/source/prod-node-setup-mgmt/setup-chef-server-aws.md
Normal file
87
docs/source/prod-node-setup-mgmt/setup-chef-server-aws.md
Normal file
@ -0,0 +1,87 @@
|
||||
# Set Up Chef Server on AWS
|
||||
|
||||
First, you need to get set up on AWS. See [the page about AWS Setup in the Appendices](../appendices/aws-setup.html).
|
||||
|
||||
Chef Software, Inc. provides an official Chef Server AMI (Amazon Machine Image) on the AWS Marketplace. They also wrote [documentation about it](https://docs.chef.io/aws_marketplace.html).
|
||||
|
||||

|
||||
|
||||
You may notice that the product page is titled "Chef Server (First 5 Nodes Free)". Chef Server [is open source (Apache v2)](https://github.com/chef/chef-server/blob/master/LICENSE), so you may wonder why it would ever be non-free. The answer, we think, is that the AMI's license includes a fast-response support channel and some premium (non-open-source) features such as Chef Analytics, Chef Management Console and Chef Reporting. For the full answer, see the End User License Agreement linked-to on the product page (in AWS Marketplace). You can leave the premium features disabled if you don't want to pay for them.
|
||||
|
||||
Five "nodes" (Chef nodes, i.e. machines other than the one running Chef Server) will be enough to build a basic BigchainDB Node, so this may be a good option.
|
||||
|
||||
If you prefer to provision your own EC2 instance and install Chef Server on that, then see the options listed on the page titled [Set Up Chef Server (General)](setup-chef-server-general.html).
|
||||
|
||||
Note that not all AWS regions are supported. The region you choose should also be used to host all the other machines in your BigchainDB node.
|
||||
|
||||
If you decide to subscribe for the official Chef Server AMI, then here are some steps and tips:
|
||||
|
||||
1. Go to the product page for "Chef Server (First 5 Nodes Free)" on the AWS Marketplace.
|
||||
|
||||
2. Click **Continue**
|
||||
|
||||
3. Select the latest version of Chef Server from the drop-down menu.
|
||||
|
||||
4. Click **Accept Software Terms**
|
||||
|
||||
5. You may not get an email, but in the AWS Marketplace website, if you click **Your Account** and **Manage your software subscriptions**, then your new subscription should be listed.
|
||||
|
||||
6. For the Chef Server product, click **Launch more software**
|
||||
|
||||
7. Click **Continue** on the Chef Server product page.
|
||||
|
||||
8. This time around, the **Launch with EC2 Console** buttons should not be greyed out. Click the one for the region where you want to launch your Chef Server.
|
||||
|
||||
9. On the "Step 2: Choose an Instance Type" page, the t2.medium instance type should suffice, but you can choose something bigger if you like. (The [Chef Server requirements are listed in the Chef documentation](https://docs.chef.io/chef_system_requirements.html#chef-server-title-on-premises). Look under "standalone deployment." Note that if you want to use Chef Analytics, you'll need more RAM.)
|
||||
|
||||
10. Click **Next: Configure Instance Details**
|
||||
|
||||
11. On the "Step 3: Configure Instance Details" page, you'll notice a red box around **IAM role** because "The AMI you have selected... requires an IAM role." Click **Create new IAM role**
|
||||
|
||||
12. Click **Create New Role**, name it `EC2_AWSMarketplaceFullAccess` (or whatever you like), click **Next Step**, select "Amazon EC2", enter `AWSMarketplaceFullAccess` into the search field, check the box beside AWSMarketplaceFullAccess, click **Next Step**, and click **Create Role**
|
||||
|
||||
13. Beside "Auto-assign Public IP" select "Enable"
|
||||
|
||||
14. Beside "Enable termination protection", check the box beside "Protect against accidental termination"
|
||||
|
||||
15. You can probably leave the other things on that page at their default values for now, but be sure to read what they mean. We'll revisit these instrutions in the future. In particular, it may be worthwhile (e.g. more secure) to create a special VPC and/or subnet for your BigchainDB node.
|
||||
|
||||
16. Click **Next: Add Storage**
|
||||
|
||||
17. As mentioned earlier, the [Chef Server requirements are listed in the Chef documentation](https://docs.chef.io/chef_system_requirements.html#chef-server-title-on-premises). Look under "standalone deployment." Note that 5 GB of free disk space is needed in `/opt` and another 5 GB is needed in `/var`. The operating system also needs some storage space. To be safe, 12 GB should be enough. You can ask Google to convert that to GiB: just search for "12 GB in GiB". The answer is: 11 GiB (approximately).
|
||||
|
||||
18. You can probably get away with "Magnetic" storage (under "Volume Type"), rather than "General Purpose SSD (GP2)" (which is more expensive), because this Chef Server will only be dealing with a handful of machines, but we'll leave that decision up to you.
|
||||
|
||||
19. Uncheck the box below "Delete on Termination." It's unlikely that the instance will get terminated, but if it is, it would be handy to have the associated storage still around to make it easier to figure out what happened, and to provide a starting point for recovery.
|
||||
|
||||
20. Click **Next: Tag Instance**
|
||||
|
||||
21. Give your Chef Server instance (machine) a Name tag like `Chef-Server`.
|
||||
|
||||
22. Click **Next: Configure Security Group**
|
||||
|
||||
23. Create a **new** security group named `chef-server-1`, with an appropriate description, and the following rules:
|
||||
|
||||
* SSH - TCP - 22 - Anywhere - 0.0.0.0/0
|
||||
* HTTPS - TCP - 443 - Anywhere - 0.0.0.0/0
|
||||
* Custom TCP Rule - TCP - 8443 - Anywhere - 0.0.0.0/0
|
||||
|
||||
24. Click **Review and Launch**
|
||||
|
||||
25. Review everything. If you want to change something, you can: Just click the **Previous** button in the lower right corner.
|
||||
|
||||
26. Click **Launch**
|
||||
|
||||
27. Select an existing key pair or create a new key pair? Create a new key pair. Name it `chef-server-key`.
|
||||
|
||||
28. Click **Download Key Pair** and save it somewhere you'll remember.
|
||||
|
||||
29. Click **Launch Instances**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
There is some [official AWS documentation about installing Chef Server on the AWS cloud](https://docs.aws.amazon.com/quickstart/latest/chef-server/welcome.html), but it's a bit dated and links to some out-of-date AWS Marketplace products. Nevertheless, you may find it useful to browse through that documentation because it explains what gets deployed.
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
# Set Up Chef Server (General)
|
||||
|
||||
Chef Software, Inc., the company behind Chef, offers managed hosting of Chef Server ("Hosted Chef"), but we advise against using that. A BigchainDB cluster is supposed to be decentralized, and it wouldn't be very decentralized if all the nodes used Hosted Chef.
|
||||
|
||||
Below are some ways to set up Chef Server, starting with the easiest.
|
||||
|
||||
* If you intend to host your node on AWS, then see [the page about setting up Chef Server on AWS](setup-chef-server-aws.html).
|
||||
|
||||
* If your hosting provider has a marketplace of images/snapshots (akin to AWS Marketplace), then search for "Chef" there.
|
||||
|
||||
* Do a web search for "Chef Server \<name of your hosting provider\>" and see what comes up.
|
||||
|
||||
* Bootstrap the installation of Chef Server using Chef-Solo and the chef-server cookbook. The instructions are in the "Install Methods" section of [the chef-server cookbook page in Chef Supermarket](https://supermarket.chef.io/cookbooks/chef-server).
|
||||
|
||||
* Follow the official Chef tutorial: [Install and configure Chef server using your hardware or cloud provider](https://learn.chef.io/install-and-manage-your-own-chef-server/linux/install-chef-server/install-chef-server-using-your-hardware/).
|
||||
|
||||
|
||||
When done, make sure your installation of Chef Server is consistent with the official Chef documentation titled [Install Chef Server](https://docs.chef.io/install_server.html).
|
Loading…
x
Reference in New Issue
Block a user