Glazier is a set of batch files, scripts and toolchains designed to
ease building CouchDB on Windows. It’s as fully automated as
possible, with most of the effort required only once.
Glazier uses the MS Visual Studio 2022 toolchain as much as possible,
to ensure a quality Windows experience and to execute all binary
dependencies within the same runtime.
We hope Glazier simplifies using Erlang and CouchDB for you, giving
a consistent, repeatable build environment.
Base Requirements
Note that the scripts you’ll run will modify your system extensively. We recommend a dedicated build machine or VM image for this work:
64-bit Windows 7+. As of CouchDB 2.0 we only support a 64-bit build of CouchDB.
We like 64-bit Windows 10 from MSDN.
Apply Windows Updates and reboot until no more updates appear.
If using a VM, shutdown and snapshot your VM at this point.
Install Dependencies
Start an Administrative PowerShell console. Enter the following:
Open a new PowerShell window. Set up your shell correctly (this step works if you’ve
closed your PowerShell window before any of the previous steps, too):
&c:\relax\couchdb-glazier\bin\shell.ps1
Then, start the process:
cd c:\relax
git clone https://github.com/apache/couchdb
cd couchdb
git checkout <tag or branch of interest goes here>
&.\configure.ps1 -SpiderMonkeyVersion 91
make -f Makefile.win
You now have built CouchDB!
To run the tests:
make -f Makefile.win check
Finally, to build a CouchDB installer:
make -f Makefile.win release
cd c:\relax
&couchdb-glazier\bin\build_installer.ps1
The installer will be placed in your current working directory.
You made it! Time to relax. :D
If you’re a release engineer, the script download_extract_rc.ps1 in
the bin\ directory helps you to download, check and extract a
CouchDB source tarball.
SYNTAX
C:\relax\couchdb-glazier\bin\download_extract_rc.ps1 [[-CouchDBVersion] <String>] [[-ReleaseCandidate] <String>] [[-Path] <String>] [<CommonParameters>]
DESCRIPTION
This command downloads, checks and extract a CouchDB source tarball
-CouchDBVersion <string> CouchDB version number to download (e.g. 3.4.2)
-ReleaseCandidate <string> Release candidate version number (e.g. rc1)
-Path <string> Directory to store the artifacts (e.g. C:\relax\releases)
To checksum a source tarball, you may find the following commands useful too:
@dch first got involved with CouchDB around 0.7. Only having a low-spec Windows
PC to develop on, and no CouchDB Cloud provider being available, he tried
to build CouchDB himself. It was hard going, and most of the frustration was
trying to get the core Erlang environment set up and compiling without needing
to buy Microsoft’s expensive but excellent Visual Studio tools. Once
Erlang was working he found many of the pre-requisite modules such as cURL,
Zlib, OpenSSL, Mozilla’s SpiderMonkey JavaScript engine, and IBM’s ICU were
not available at a consistent compiler and VC runtime release.
There is a branch of glazier that has been used to build each CouchDB release.
Windows silent installs
Here are some sample commands, supporting the new features of the 3.0 installer.
Install CouchDB without a service, but with an admin user:password of admin:hunter2:
Glazier
Glazier is a set of batch files, scripts and toolchains designed to ease building CouchDB on Windows. It’s as fully automated as possible, with most of the effort required only once.
Glazier uses the MS Visual Studio 2022 toolchain as much as possible, to ensure a quality Windows experience and to execute all binary dependencies within the same runtime.
We hope Glazier simplifies using Erlang and CouchDB for you, giving a consistent, repeatable build environment.
Base Requirements
Note that the scripts you’ll run will modify your system extensively. We recommend a dedicated build machine or VM image for this work:
Install Dependencies
Start an Administrative PowerShell console. Enter the following:
You should go get lunch. The last step will take over an hour, even on a speedy Internet connection.
You’re finally ready. You should have the following installed:
You should snapshot your VM at this point.
Building CouchDB itself
Open a new PowerShell window. Set up your shell correctly (this step works if you’ve closed your PowerShell window before any of the previous steps, too):
Then, start the process:
You now have built CouchDB!
To run the tests:
Finally, to build a CouchDB installer:
The installer will be placed in your current working directory.
You made it! Time to relax. :D
If you’re a release engineer, the script
download_extract_rc.ps1in thebin\directory helps you to download, check and extract a CouchDB source tarball.To checksum a source tarball, you may find the following commands useful too:
Appendices
Why Glazier?
@dch first got involved with CouchDB around 0.7. Only having a low-spec Windows PC to develop on, and no CouchDB Cloud provider being available, he tried to build CouchDB himself. It was hard going, and most of the frustration was trying to get the core Erlang environment set up and compiling without needing to buy Microsoft’s expensive but excellent Visual Studio tools. Once Erlang was working he found many of the pre-requisite modules such as cURL, Zlib, OpenSSL, Mozilla’s SpiderMonkey JavaScript engine, and IBM’s ICU were not available at a consistent compiler and VC runtime release.
There is a branch of glazier that has been used to build each CouchDB release.
Windows silent installs
Here are some sample commands, supporting the new features of the 3.0 installer.
Install CouchDB without a service, but with an admin user:password of
admin:hunter2:The same as above, but also install and launch CouchDB as a service:
Unattended uninstall of CouchDB:
Unattended uninstall if the installer file is unavailable:
Add
/l* log.txtto any of the above to generate a useful logfile for debugging.