카우치베이스 서버

Summer Project 2016 update: The Couchcase Begins

7 분 읽기

Last time, I blogged about the concept of my summer project: the suitcase cluster for demonstrating 카우치베이스 서버. I have good news: the project is underway! In this blog post, I’m going to show you how I started preparing the hardware.

But first, a couple quick notes:

  1. A friend of mine on Twitter came up with a catchy name for what I’m building: the Couchcase. So that’s what I’m going to call it from now on. The #Couchbase Couchcase.
  2. I wanted to give some more credit to the inspiriation for this project: Fujio Turner. He sent me a picture of the elaborate setup that he takes to meetups and conferences, and I thought I would share it with you.
fujioturnercluster

My version will be simpler, have an emphasis on Couchbase Server, and will be mounted into a briefcase for portability and ease of setup/teardown. But what I’m building is very similar to his original project.

Couchbase on a Stick

In the previous blog post, I mentioned that I was going to try “compute sticks”, since they have 64-bit Intel CPUs and 2gb RAM.

The first device I tried was a GOLE Windows 10/Android stick PC. This has a 64-bit CPU, but what I didn’t realize was that it comes with Windows 10 32-bit (which Couchbase Server will not run on). My next thought was “no big deal, I’ll create a bootable USB thumbdrive with Ubuntu or 64-bit Windows.” For the GOLE, this is easier said than done! I couldn’t figure out any way to get this thing to recognize and boot from a USB drive.

intelcomputestick

Figure 1. Intel Compute Stick, nickel (or is it a N1QL?) for scale

The next device I got was an Intel Compute Stick. It’s almost identical to the GOLE stick. When it arrived, I found that it too came with Windows 10 32-bit (FYI, there is a version that comes with 64-bit Ubuntu pre-installed, but that version only ships with 1gb of RAM). The key difference is that I was able to get it to recognize and boot from a USB drive.

Warning: replacing the factory OS with something else is likely to void your warranty and/or any hope of getting help from Intel in the future.

However, it’s not 100% straightforward to go from unboxing to Couchbase Server. Here’s an overview of the steps I took.

1. Update BIOS

The Compute Stick is meant to always be plugged into your TV via HDMI. It’s actually a pretty cool alternative to a Chromecast or Roku stick because you aren’t limited to a set of apps. You can browse the web and view Netflix, of course, but if some other streaming service comes along, or you want to use some obscure service that doesn’t have a Roku app yet, this is the tool for you.

Anyway, for this project, I have no need to have any display adapter attached to them. However, what I found is that if a stick is turned off and back on, it will not boot to the OS if there is no display attached. UNLESS, you update the BIOS.

I got the latest BIOS from Intel’s site, copied it to a USB thumb drive. Then I boot the Compute Stick, load up the BIOS, and update the BIOS firmware.

bios_update

After you do this, the compute stick has no problem booting into the OS without a display attached.

2. Create a bootable USB thumbdrive.

I decided to use Ubuntu 14, 64-bit. I created a bootable USB drive from Windows using a tool called Rufus, following the instructions on Ubuntu’s website. The only thing I believe I did differently is that under the “Create a bootable disk using” setting, I selected “DD Image” instead of “ISO Image”. YMMV, but if you use “ISO Image” you may get a “CD-ROM” error during Ubuntu installation.

3. Attach the bootable USB thumbdrive, a keyboard, and mouse.

The compute stick only has one USB port, so I had to use a hub to connect all the devices I wanted to use: keyboard, mouse, thumbdrives, and USB-Ethernet adapter.

usb_hub

4. Change the boot settings

The next thing to do is to change a couple settings in the BIOS.

Change the “Select Operating System” setting from Windows to Ubuntu.

select_operating_system

Change the “Boot Drive Order” so that the BIOS will boot into the bootable USB drive you created in step 2.

boot_drive_order

Save changes and exit the BIOS.

5. Install Ubuntu.

I’m sure a lot of you have done this before, on a VM at least. Installing Ubuntu is a piece of cake, even for a unenlightened Windows user like me! You might want to connect the Compute Stick to the internet, using a USB-Ethernet adapter. This allows Ubuntu to download updates while it installs. You’ll probably need this adapter later anyway, so you may as well plug it in and use it now.

install_ubuntu

Note that I’m using Ubuntu Desktop. Ubuntu Server should work fine too, if you’re feeling more adventurous. But since this is project is just for fun, and you’re not actually using Compute Sticks in your data center (right!?), the desktop version will suffice.

6. Install wifi driver

If I had purchased the Intel Compute Stick that came preinstalled with Ubuntu, I’m guessing it would already come with a wifi driver installed. And in my experience, Ubuntu usually has no trouble with most wifi hardware. Unfortunately, it seems that a stock Ubuntu 14 installation can’t recognize the built-in wifi hardware on the Compute Stick. So, you’ll have to build and install it yourself. This took me a while to figure out, but I found some information on the Ubuntu Forums that helped. I mentioned in step 5 that you might need a USB-Ethernet adapter, and that’s because installing this driver requires the use of apt-get and git.

I opened a Terminal window and ran these commands:

Some notes:

  • Whenever I run the last command (sudo modprobe 8723bs) I get an error message (“Module 8723bs not found”). This caused me no end of grief. However, the solution seems to be to just reboot (sudo reboot).
  • For whatever reason, the built-in wifi would not function when I still had my USB-Ethernet adapter plugged in. This also caused me a lot of grief. Solution: unplug it.
  • Just in case the above-linked Github account disappears, I made a fork of it on Github that you can use instead.

7. Install Couchbase Server

This is the easiest part. Download Couchbase Server (for Ubuntu 14, in my case), and double click the installer. Click the “Install” button in the Ubuntu Software Center, and you’re all set.

install_couchbase_on_ubuntu

What’s next?

If you look back at my original plan, you can probably guess what’s next. But here’s a hint.

three_compute_sticks

I hope you found this useful. Or at least entertaining.

If you have suggestions or ideas look me up on Twitter or email me (matthew.groves AT couchbase DOT com). I’d especially love to hear from you if you are trying something similar.

이 기사 공유하기

작가

매튜 D. 그로브스는 코딩을 정말 좋아하는 사람입니다. C#, jQuery, PHP 등 어떤 언어든 상관없이, 그는 무엇이든 풀 리퀘스트를 제출합니다. 그는 90년대에 부모님이 운영하던 피자 가게를 위해 QuickBASIC으로 POS(판매 시점 관리) 앱을 개발한 이래로 줄곧 전문 프로그래머로 활동해 왔습니다. 현재는 Couchbase에서 선임 제품 마케팅 매니저로 근무하고 있습니다. 여가 시간에는 가족과 함께 시간을 보내거나, 레즈(Reds) 경기를 관람하며, 개발자 커뮤니티 활동에 참여합니다. 그는 『AOP in .NET』과 『Pro Microservices in .NET』의 저자이자 Pluralsight 저자이며, Microsoft MVP이기도 합니다.

댓글 남기기

카우치베이스 카펠라를 시작할 준비가 되셨나요?

개발 시작하기

NoSQL을 탐색하고, 리소스를 찾아보고, 튜토리얼을 시작하려면 개발자 포털을 확인하세요.

카펠라 프리 사용하기

단 몇 번의 클릭으로 카우치베이스(Couchbase)를 직접 체험해 보세요. Capella DBaaS는 시작하기 가장 쉽고 빠른 방법입니다.

연락해

Couchbase 제품군에 대해 더 알고 싶으신가요? 저희가 도와드리겠습니다.