Vagrant Box 中的 ArangoDB 无人值守安装

ArangoDB Unattended Install in Vagrant Box

尝试在 Vangrant Ubuntu 框中设置 ArangoDB 的无人值守安装。我已按照此处的无人值守安装说明进行操作:https://docs.arangodb.com/3.1/Manual/GettingStarted/Installing/Linux.html

不过,此为帐号密码提示,而非升级数据库和备份数据库文件的提示。如何让这些沉默?

好的,我明白了。基本上你需要使用以下命令:

sudo debconf-get-selections | grep arangodb3

If you get a "debconf-get-selections command not found error" then you need to install the debconf-utils package like so:

sudo apt-get install -y debconf-utils

这将吐出如下列表:

arangodb3       arangodb3/password      password
arangodb3       arangodb3/password_again        password
arangodb3       arangodb3/backup        boolean false
arangodb3       arangodb3/password_mismatch     error
arangodb3       arangodb3/upgrade       boolean true

这些是设置无人值守安装所需的所有键和类型。当我说键和类型时,我指的是:

  package/key      type
arangodb3/backup   boolean

上例中包为arangodb3,key为backup,type为boolean。然后在您的设置脚本中,您需要像这样使用您选择的值来包含它:

echo arangodb3 arangodb3/backup boolean false | debconf-set-selections
echo arangodb3 arangodb3/upgrade boolean true | debconf-set-selections

添加到 skinneejoe 的回答中,我必须设置以下所有选项以使版本 3.3.19 运行 的安装无人值守:

RUN echo arangodb3 arangodb3/password string somepassword | debconf-set-selections
RUN echo arangodb3 arangodb3/password_again string somepassword | debconf-set-selections
RUN echo arangodb3 arangodb3/upgrade boolean true | debconf-set-selections
RUN echo arangodb3 arangodb3/storage_engine string 1 | debconf-set-selections
RUN echo arangodb3 arangodb3/backup boolean false | debconf-set-selections

可以在以下位置找到选择:https://github.com/arangodb/arangodb/blob/master/Installation/debian/config.in