Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Content imported from a Scroll Translations translation file.
Sv translation
languageen

This is the base document for the docs provided to NEC for Docker deployment in their Debian devices, and in Azure.


Excerpt

Installing Docker

Note
titleIs Docker Already Configured?

If docker is already installed on your machine, you can skip this section


Note

The following steps assume that you have SSH'ed into your virtual machine using putty, bash, etc.

Ensure the system is updated:

Code Block
sudo apt-get update

Install some packages needed to allow the use of APT over HTTPS:

Code Block
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Add Docker's official GPG key:

Code Block
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Add the official docker APT repository (following the appropriate command for Debian, or for Ubuntu depending on your operating system):

Code Block
languagebash
titleDEBIAN - Adding the Docker Repository under Debian
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

or

Code Block
languagebash
titleUBUNTU - Adding the Docker Repository under Ubuntu
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu  $(lsb_release -cs) stable" 

Update the package index again:

Code Block
sudo apt-get update

Install the latest version of Docker Engine (community edition and containerd):

Code Block
sudo apt-get install docker-ce docker-ce-cli containerd.io

Preparing a Deployment Configuration

Now we must prepare our deployment specific configuration files. Start by downloading the FileFlex server image:

Download the FileFlex docker image into the current user's home folder root:

Code Block
cd ~
wget --http-user developer --http-password 2trEndY! https://res.fileflex.com/nec/docker/fileflex-v2.5.tar


Note

The method used for obtaining the image can be replaced by any method of your choosing, as long as a copy of the same image is used. This example proceeds with an HTTPS download as the chosen method.

Once our docker image is downloaded, we will create a special folder inside our home that will contain all deployment configuration files which will be made available to the running Docker instance.

Create a folder ~/config in the user's home folder that will contain all deployment configuration files

Code Block
mkdir ~/config


Info
titleThe Mounting of Deployment Config

The ~/config folder will be mounted by Docker, and will become available to the running instance under /opt/ffs/config. When setting path values in the configuration file (INI file), the code running within the container expects a path of /opt/ffs/config, despite it being available in the host machine as ~/config

It's important to note that in this example we are placing the host's config folder under the user home folder (/home/dadmin/config), but this could be any other folder in the host system. Ensure that the INI file is adjusted to reflect this alternate location if you chose to use it.

As mentioned in the note, ~/config will be available to the container code as /opt/ffs/config.

We must now upload the certificate files, and the deployment info file (INI file) into this ~/config folder.

Note
titleExample Only

This document does NOT specifically describe how to get these 3 files into the host machine. They can be copied through the local network, download by HTTP, or copied into the host machine by SCP.

If the Docker host machine has been deployed in the cloud (for example in Azure), SCP is likely your best bet for getting the configuration files uploaded.

An example is provided here whereby the files are copied from a remote machine into the host using SCP, but the specific method used must be adapted by the individuals following these steps.

Preparing the Certificate

Copy your domain's certificate files into our ~/config folder. This is an example only!

Code Block
cd ~/config
scp some_user@some_domain.com:~/some_folder_with_certificates/STAR_fileflexdemo* .

In our example, we have the following 3 certificate-related files in our ~/config folder:

Code Block
-rw-r----- 1 dadmin dadmin 4123 Mar 26 22:01 STAR_fileflexdemo_com.ca-bundle
-rw-r----- 1 dadmin dadmin 2313 Mar 26 22:01 STAR_fileflexdemo_com.crt
-rw-r----- 1 dadmin dadmin 1704 Mar 26 22:01 STAR_fileflexdemo_com.key

The deployment configuration file (INI file) expects a single certificate, so we must combine with bundle/intermediate with the primary certificate. An example for GoDaddy certificates is:

Code Block
languagebash
titleCombining GoDaddy Certificates
 cat 524daaa823ca8e28.crt gd_bundle-g2-g1.crt >> cert_chain.crt

In our case we have Sectigo certificates, so we issue the following command:

Code Block
languagebash
titleCombining Sectigo Certificates
cat STAR_fileflexdemo_com.crt STAR_fileflexdemo_com.ca-bundle >> cert_chain.crt

This will result in a new file being created in our folder:

Code Block
-rw-r--r-- 1 dadmin dadmin 6436 Mar 26 22:05 cert_chain.crt
-rw-r----- 1 dadmin dadmin 4123 Mar 26 22:01 STAR_fileflexdemo_com.ca-bundle
-rw-r----- 1 dadmin dadmin 2313 Mar 26 22:01 STAR_fileflexdemo_com.crt
-rw-r----- 1 dadmin dadmin 1704 Mar 26 22:01 STAR_fileflexdemo_com.key

Preparing a Deployment Configuration File

We must now prepare a deployment configuration file (setup.ini). This will typically be done on another machine and then copied into this host machine. In our example, the file is being prepared on the same machine that had the certificates from the prior step.

In a working folder somewhere, create a file called "setup.ini" that will contain our deployment configuration information. Note that the paths contained in this file are interpreted as bring within the running container instance's path, not the host machine's path!

Code Block
[default]
skip-page = [all]
admin-password = Q!w2e3r4
repo-select = None
firewall-enable = False
cert-pem = /opt/ffs/config/cert_chain.pem
cert-key = /opt/ffs/config/STAR_fileflexdemo_com.key
cert-password = randompassword
msp-id = 5e7bae3xxxxxxxxxxxxx67
msp-key = IBM34SOLELPXXXXXXXXXXXXXYWECF
hostname = docker.fileflexdemo.com
docker = True


Note

Ensure that you customize the following fields in the setup.ini file:

  • The admin password should be set to a value you are comfortable with (for the user admin application)
    • Your password must contain at least 8 characters, 1 capital, and one number 
  • The cert-pem filename (not path) should reflect your combined PEM file name. In our example it was cert_chain.crt.
  • The cert-key filename should reflect your real key file name. In our example it was STAR_fileflexdemo_com.key
  • The cert-password should be some random characters to protect your keystore. You are unlikely to need it again.
  • Your hostname should be the hostname which you are deploying. docker.fileflexdemo.com in this example.
  • Your msp-id should be the same as your "Deployment ID" and will have been provided to you in the Enterprise Portal. ( Also shown below in screenshot)  
  • your msp-key should be the same as your "Deployment Key" and will have been provided to you in the Enterprise Portal. ( Also shown below in screenshot) 

The other fields should remain as they are in an automated Docker configuration.

Let's copy the setup.ini file from the remote working machine into our host:

Code Block
cd ~/config
scp some_user@some_domain.com:~/some_folder_with_config/setup.ini .

Deploying our Docker Image

Now that we have a folder on the host machine containing the certificate files, and deployment configuration file (setup.ini), we're ready to load our image into docker and start things up.

Import the FileFlex docker image:

Code Block
cd ~
sudo docker load -i fileflex-v2.4.tar

This will take a moment. Once complete, check that the image is properly imported by running:

Code Block
sudo docker images 

... and you should see output similar to:

Code Block
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
fileflex            v2.4                ee4498eb1078        18 hours ago        2.02GB

Run the imported FileFlex container:

Warning
titleHostname Warning

Be sure to modify the hostname parameter in the following command to match your deployment hostname!

Also, check that your bind source folder points to your actual host configuration folder


Code Block
sudo docker run -it -p 9443:9443 -p 443:443 -p 80:80 -p 4007:4007 -p 4010:4010 -p 4011:4011 -p 3310:3310 -d --name=fileflex --mount type=bind,source=/home/dadmin/config,target=/opt/ffs/config --hostname docker.fileflexdemo.com fileflex:v2.4

Validate that the container is running:

Code Block
sudo docker ps 

... you should see output similar to:

Code Block
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                                                                                                                                 NAMES
4e0ad8deb93c        fileflex:v2.4       "/usr/bin/supervisord"   22 seconds ago      Up 16 seconds       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4007->4007/tcp, 0.0.0.0:4010-4011->4010-4011/tcp, 0.0.0.0:9443->9443/tcp, 0.0.0.0:32768->3310/tcp   fileflex


Note

It can take a few minutes for the instance to finish booting, even after the docker command returns.

Congratulations, FileFlex is now running. You should be able to access server admin by opening a browser to:

Code Block
https://docker.fileflexdemo.com:9443

Next Steps

Logging in to Server Admin

Some configuration is necessary to obtain a properly running FileFlex server instance. The first step is to log in to Server Admin over port 9443. Open a browser at your domain URL (docker.fileflexdemo.com is an example only)

Code Block
https://docker.fileflexdemo.com:9443

When prompted for login credentials, use the following:

  • Username: sadmin
  • Password: Q!w2e3r4

Once logged in you will see a screen similar to the following:

Configuring a User Administration Account

You will need a user administration account in order to configure user accounts. Under Control Panel, click on "User Administration":

A prior account will be shown, but the password isn't known to you, so create a new one. Click the lock symbol to edit the values:

Click Apply when you're satisfied.

Accessing User Administration

User Administration is accessed from the primary FileFlex login, which should now be accessible at the URL you provided earlier (docker.fileflexdemo.com in this example). Open your browser to that URL over HTTPS:

Code Block
https://docker.fileflexdemo.com

... you will be presented with the FileFlex login page:

Enter the user admin credentials you previously created, and click login. You should then be presented with the "User Administration" user interface:

Primary configuration of FileFlex Enterprise is now complete. 


Sv translation
languageja_JP

これは、Debian デバイスおよび Azure に Docker デプロイを行うために NEC に提供されるドキュメントの基本ドキュメントです。


Excerpt

Docker のインストール

Note
titleDocker は既に設定されていますか?

Docker が既にマシンにインストールされている場合は、このセクションをスキップできます


Note

次の手順は、putty、bash などを使用して仮想マシンに SSH 接続したことを前提としています。

システムが最新の状態に保たれていることを確認します。

Code Block
sudo apt-get update 

HTTPS 経由で APT を使用できるようにするために必要なパッケージをいくつかインストールします。

Code Block
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common 

Docker の公式 GPG キーを追加します。

Code Block
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - 

公式の DockerAPT リポジトリを追加します (オペレーティングシステムに応じて、Debian または Ubuntu の適切なコマンドに従います)。

Code Block
languagebash
titleDEBIAN - Debian の下に Docker リポジトリを追加する
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" 

または

Code Block
languagebash
titleUBUNTU - Ubuntu の下に Docker リポジトリを追加する
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 

パッケージインデックスを再度更新します。

Code Block
sudo apt-get update 

最新バージョンの Docker Engine (コミュニティエディションおよび containerd) をインストールします。

Code Block
sudo apt-get install docker-ce docker-ce-cli containerd.io 

デプロイ設定の準備

次に、デプロイ固有の設定ファイルを準備する必要があります。FileFlex サーバーイメージをダウンロードすることから始めます。

以下のように、FileFlex Docker イメージを現在のユーザーのホームフォルダルートにダウンロードします。

Code Block
cd ~ wget --http-user developer --http-password 2trEndY! https://res.fileflex.com/nec/docker/fileflex-v2.5.tar 


Note

イメージを取得するために使用した方法は、同じイメージのコピーを使用する限り、お客様が選好する方法に置き換えることができます。この例では、選択した方法として HTTPS ダウンロードを続行します。

Docker イメージがダウンロードされたら、すべてのデプロイ設定ファイルを含む特別なフォルダをホーム内に作成します。設定ファイルは、実行中の Docker インスタンスで使用できるようになります。

すべてのデプロイ設定ファイルを含むフォルダ ~/config をユーザーのホームフォルダに作成します

Code Block
mkdir ~/config


Info
titleデプロイ設定のマウント

~/config フォルダは Docker によってマウントされ、/opt/ffs/config の実行中のインスタンスで使用できるようになります。設定ファイル(INI ファイル)でパス値を設定する場合、コンテナ内で実行されているコードは、ホストマシン~/config として使用できるにもかかわらず、/opt/ffs/config のパスを想定しています。

この例では、ホストの config フォルダをユーザーのホームフォルダ (/home/dadmin/config) の下に配置していますが、これはホストシステム内の他のフォルダでもよいことに注意してください。他のフォルダを使用する場合は、この代替場所を反映するように INI ファイルを調整してください。

注に記載されているように、~/config は/ opt/ffs/config としてコンテナコードで使用できます。

次に、証明書ファイルとデプロイ情報ファイル (INI ファイル) をこの~/config フォルダにアップロードする必要があります。

Note
titleこれは単なる例です

このドキュメントでは、これら 3 つのファイルをホストマシンに取り込む方法について具体的に説明していません。これらのファイルは、ローカルネットワークを介してコピーするか、HTTP でダウンロードするか、SCP でホストマシンにコピーすることができます。

Docker ホストマシンがクラウド (Azure など) にデプロイされている場合、設定ファイルをアップロードするには SCP が最適である可能性があります。

ここでは、SCP を使用してファイルをリモートマシンからホストにコピーする例を示しますが、これらの手順に従って具体的に使用する方法を個人で調整する必要があります。

証明書の準備

ドメインの証明書ファイルを ~/config フォルダにコピーします。これは単なる例です。

Code Block
cd ~/config scp some_user@some_domain.com:~/some_folder_with_certificates/STAR_fileflexdemo* .

この例では、~/config フォルダに次の 3 つの証明書関連ファイルがあります。

Code Block
-rw-r----- 1 dadmin dadmin 4123 Mar 26 22:01 STAR_fileflexdemo_com.ca-bundle -rw-r----- 1 dadmin dadmin 2313 Mar 26 22:01 STAR_fileflexdemo_com.crt -rw-r----- 1 dadmin dadmin 1704 Mar 26 22:01 STAR_fileflexdemo_com.key

デプロイ設定ファイル (INI ファイル) は 1 つの証明書を想定しているため、バンドル/媒介とプライマリ証明書を組み合わせる必要があります。GoDaddy 証明書の例は次のとおりです。

Code Block
languagebash
titleGoDaddy 証明書の組み合わせ
 cat 524daaa823ca8e28.crt gd_bundle-g2-g1.crt >> cert_chain.crt

この場合、Sectigo 証明書があるため、次のコマンドを発行します。

Code Block
languagebash
titleSectigo 証明書の組み合わせ
cat STAR_fileflexdemo_com.crt STAR_fileflexdemo_com.ca-bundle >> cert_chain.crt

これにより、フォルダに新しいファイルが作成されます。

Code Block
-rw-r--r-- 1 dadmin dadmin 6436 Mar 26 22:05 cert_chain.crt -rw-r----- 1 dadmin dadmin 4123 Mar 26 22:01 STAR_fileflexdemo_com.ca-bundle -rw-r----- 1 dadmin dadmin 2313 Mar 26 22:01 STAR_fileflexdemo_com.crt -rw-r----- 1 dadmin dadmin 1704 Mar 26 22:01 STAR_fileflexdemo_com.key

デプロイ設定ファイルの準備

次に、デプロイ設定ファイル (setup.ini) を準備する必要があります。これは通常、別のマシンで準備してから、このホストマシンにコピーします。この例では、ファイルは前のステップの証明書を持っていたのと同じマシンで準備しています。

どこかの作業フォルダに、デプロイ設定情報を含む「setup.ini」というファイルを作成します。このファイルに含まれるパスは、ホストマシンのパスではなく、実行中のコンテナインスタンスのパス内に持ち込まれるものと解釈されることに注意してください。

Code Block
[default] skip-page = [all] admin-password = Q!w2e3r4 repo-select = None firewall-enable = False cert-pem = /opt/ffs/config/cert_chain.pem cert-key = /opt/ffs/config/STAR_fileflexdemo_com.key cert-password = randompassword msp-id = 5e7bae3xxxxxxxxxxxxx67 msp-key = IBM34SOLELPXXXXXXXXXXXXXYWECF hostname = docker.fileflexdemo.com docker = True


Note

setup.ini ファイルの次のフィールドを必ずカスタマイズしてください。

  • 管理者パスワードは、 (ユーザー管理アプリケーション用の) 適切な値に設定する必要があります
    • パスワードには、少なくとも 8 文字を使用し、1 つの大文字、1 つの数字が含まれている必要があります 
  • cert-pem ファイル名 (パスではなく) は、組み合わせた PEM ファイル名を反映している必要があります。この例では、cert_chain.crt でした。
  • cert-key ファイル名は、実際のキーファイル名を反映している必要があります。この例では、STAR_fileflexdemo_com.key でした。
  • キーストアを保護するために、cert-password はランダムな文字にする必要があります。それが再び必要となる可能性は低いでしょう。
  • ホスト名は、デプロイするホスト名である必要があります。この例では、docker.fileflexdemo.com です。
  • msp-id は「Deployment ID」と同じである必要があり、Enterprise ポータルで提供されています。(下のスクリーンショットにも表示されています)  
  • msp-key は「Deployment Key」と同じである必要があり、Enterprise ポータルで提供されています。(下のスクリーンショットにも表示されています) 

他のフィールドは、自動 Docker 設定のままにしておく必要があります。

setup.ini ファイルをリモート作業マシンからホストにコピーしましょう。

Code Block
cd ~/config scp some_user@some_domain.com:~/some_folder_with_config/setup.ini .

Docker イメージのデプロイ

ホストマシン上に証明書ファイルとデプロイ設定ファイル (setup.ini) を含むフォルダができたので、イメージを Docker にロードして起動する準備が整いました。

以下のように、FileFlexDocker イメージをインポートします。

Code Block
cd ~ sudo docker load -i fileflex-v2.4.tar 

これには少し時間がかかります。完了したら、以下を実行して、イメージが正しくインポートされていることを確認します。

Code Block
sudo docker images 

... すると、次のような出力が表示されます。

Code Block
REPOSITORY TAG IMAGE ID CREATED SIZE fileflex v2.4 ee4498eb1078 18 hours ago 2.02GB 

インポートされた FileFlex コンテナを実行します。

Warning
titleホスト名の警告

次のコマンドの hostname パラメータを、デプロイのホスト名と一致するように変更してください。

また、バインドソースフォルダが実際のホスト設定フォルダを指していることを確認してください


Code Block
sudo docker run -it -p 9443:9443 -p 443:443 -p 80:80 -p 4007:4007 -p 4010:4010 -p 4011:4011 -p 3310:3310 -d --name=fileflex --mount type=bind,source=/home/dadmin/config,target=/opt/ffs/config --hostname docker.fileflexdemo.com fileflex:v2.4

コンテナが実行されていることを確認します。

Code Block
sudo docker ps 

... 次のような出力が表示されます。

Code Block
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4e0ad8deb93c fileflex:v2.4 "/usr/bin/supervisord" 22 seconds ago Up 16 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4007->4007/tcp, 0.0.0.0:4010-4011->4010-4011/tcp, 0.0.0.0:9443->9443/tcp, 0.0.0.0:32768->3310/tcp fileflex


Note

Docker コマンドが戻った後でも、インスタンスの起動が完了するまでに数分かかる場合があります。

おめでとうございます。FileFlex が稼働しています。以下にブラウザを開くと、サーバー管理にアクセスできるはずです。

Code Block
https://docker.fileflexdemo.com:9443

次のステップ

サーバー管理へのログイン

正しく実行されている FileFlex サーバーインスタンスを取得するには、いくつかの設定が必要です。最初のステップは、ポート 9443 を介してサーバー管理にログインすることです。ドメイン URL でブラウザを開きます (docker.fileflexdemo.com は一例に過ぎません)

Code Block
https://docker.fileflexdemo.com:9443

ログイン認証情報の入力を求められたら、以下を使用します。

  • ユーザー名: sadmin
  • パスワード: Q!w2e3r4

ログインすると、次のような画面が表示されます。

ユーザー管理アカウントの設定

ユーザーアカウントを設定するには、ユーザー管理アカウントが必要です。コントロールパネルで、[ユーザー管理] をクリックします。

以前のアカウントが表示されますが、パスワードがわからないため、新しいアカウントを作成します。ロック記号をクリックして、値を編集します。

編集し終えたら、[適用] をクリックします。

ユーザー管理へのアクセス

ユーザー管理には、プライマリ FileFlex ログインからアクセスします。これでは、以前に指定した URL からアクセスできるようになっているはずです (この例では、docker.fileflexdemo.com)。HTTPS 経由でその URL にブラウザを開きます。

Code Block
https://docker.fileflexdemo.com

... FileFlex ログインページが表示されます。

以前に作成したユーザー管理者の認証情報を入力し、[ログイン] をクリックします。次に、「ユーザー管理」ユーザーインターフェイスが表示されます。

これで、FileFlex Enterprise のプライマリ設定が完了しました。