GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ubuntu20.04にRalphAssetManagementSystemをインストールする方法

ラルフは、データセンターおよびバックオフィス向けの無料のオープンソースのシンプルで強力な資産管理、DCIMおよびCMDBシステムです。 Django、Python3の上に構築され、資産の購入とそのライフサイクルを追跡するために使用されます。ユーザーフレンドリーなウェブインターフェースが付属しており、柔軟で正確なコストレポートを生成できます。

このチュートリアルでは、Ubuntu20.04にDockerを使用してRalphAssetManagementSystemをインストールする方法を示します。

前提条件
  • Ubuntu20.04を実行しているサーバー。
  • ルートパスワードがサーバーに設定されています。
はじめに

開始する前に、システムのパッケージを最新バージョンに更新することをお勧めします。次のコマンドを使用して更新できます:

apt-get update -y
apt-get upgrade -y

すべてのパッケージが更新されたら、システムを再起動して変更を適用します。

DockerとDockerComposeをインストールする

デフォルトでは、DockerおよびDockerComposeの最新バージョンはUbuntu20.04サーバーのデフォルトリポジトリで利用できます。次のコマンドを実行してインストールできます:

apt-get install docker.io docker-compose -y

両方のパッケージをインストールした後、Dockerサービスを開始し、次のコマンドを使用してシステムの再起動後に開始できるようにします。

systemctl start docker
systemctl enable docker

次に、次のコマンドを使用してDockerのステータスを確認します。

systemctl status docker

次の出力が得られるはずです:

? docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-04-29 08:06:11 UTC; 6s ago
TriggeredBy: ? docker.socket
       Docs: https://docs.docker.com
   Main PID: 3371 (dockerd)
      Tasks: 10
     Memory: 36.0M
     CGroup: /system.slice/docker.service
             ??3371 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552343504Z" level=warning msg="Your kernel does not support swap memory limi>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552406263Z" level=warning msg="Your kernel does not support cgroup blkio wei>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552423110Z" level=warning msg="Your kernel does not support cgroup blkio wei>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552769597Z" level=info msg="Loading containers: start."
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.710947740Z" level=info msg="Default bridge (docker0) is assigned with an IP >
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.793048851Z" level=info msg="Loading containers: done."
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.819265563Z" level=info msg="Docker daemon" commit=afacb8b7f0 graphdriver(s)=>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.819655292Z" level=info msg="Daemon has completed initialization"
Apr 29 08:06:11 ubuntu20 systemd[1]: Started Docker Application Container Engine.
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.874074016Z" level=info msg="API listen on /run/docker.sock"
lines 1-21/21 (END)
でリッスンします

次に、以下のコマンドを使用して、インストールされているDockerのバージョンを確認します。

docker -v

次の出力が得られるはずです:

Docker version 19.03.8, build afacb8b7f0

次に、次のコマンドを使用してDocker-composeのバージョンを確認します。

docker-compose -v

次の出力が得られるはずです:

docker-compose version 1.25.0, build unknown

Dockerを使用してRalphをインストールする

まず、次のコマンドを使用してgitパッケージをインストールします。

apt-get install git -y

次に、次のコマンドを使用して、Gitリポジトリから最新バージョンのRalphをダウンロードします。

git clone https://github.com/allegro/ralph.git

ダウンロードしたら、ディレクトリをralph / dockerに変更し、次のコマンドでRalphを初期化します。

cd ralph/docker
docker-compose run web init

次に、次のコマンドを使用してRalphのコンテナをダウンロードしてビルドします。

docker-compose up -d

すべてのコンテナがダウンロードされたら、次のコマンドで実行中のコンテナを確認できます。

docker ps

次の出力が表示されます。

CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                     NAMES
6d99415b9569        allegro/ralph:latest                "/var/local/ralph/do…"   40 seconds ago      Up 38 seconds       0.0.0.0:32771->8000/tcp   docker_web_1
fcede6c8a3d3        allegro/inkpy:latest                "/bin/sh -c 'supervi…"   40 seconds ago      Up 38 seconds                                 docker_inkpy_1
c93bf3a397d5        redis:3.0                           "docker-entrypoint.s…"   6 minutes ago       Up 6 minutes        0.0.0.0:32770->6379/tcp   docker_redis_1
ac4f4c278443        mysql:5.7                           "docker-entrypoint.s…"   6 minutes ago       Up 6 minutes        3306/tcp, 33060/tcp       docker_db_1
b0e6a7beeb61        allegro/ralph-static-nginx:latest   "nginx -g 'daemon of…"   6 minutes ago       Up 3 seconds        0.0.0.0:80->80/tcp        docker_nginx_1

次のコマンドを使用して、実行中のすべてのコンテナのポートを確認することもできます。

docker-compose ps

次の出力が表示されます。

     Name                   Command               State            Ports         
---------------------------------------------------------------------------------
docker_db_1      docker-entrypoint.sh mysql ...   Up      3306/tcp, 33060/tcp    
docker_inkpy_1   /bin/sh -c supervisord -n        Up                             
docker_nginx_1   nginx -g daemon off;             Up      0.0.0.0:80->80/tcp     
docker_redis_1   docker-entrypoint.sh redis ...   Up      0.0.0.0:32770->6379/tcp
docker_web_1     /var/local/ralph/docker-en ...   Up      0.0.0.0:32771->8000/tcp
アクセスラルフWebインターフェース

次に、Webブラウザーを開き、URL http://your-server-ipを入力します。ラルフのログインページが表示されます:

デフォルトのユーザー名をralph、パスワードをralphとして指定し、ログをクリックします。 ボタン。次のページにラルフのデフォルトダッシュボードが表示されます。

結論

おめでとう!これで、Ubuntu20.04にDockerを使用してRalphAssetManagementSystemが正常にインストールされました。 IT資産を中央の場所から簡単に管理できるようになりました。ご不明な点がございましたら、お気軽にお問い合わせください。


Ubuntu
  1. Ubuntu18.04にDockerをインストールする方法

  2. Ubuntu16.04にDockerをインストールする方法

  3. Ubuntu 18.04 / Ubuntu 18.10 /Ubuntu19.04にDockerをインストールする方法

  1. Ubuntu18.04にKubernetesをインストールする方法

  2. Ubuntu18.04にDockerComposeをインストールする方法

  3. UbuntuにRancherをインストールする方法

  1. Ubuntu20.04にDockerComposeをインストールする方法

  2. Ubuntu22.04にDockerをインストールする方法

  3. Ubuntu20.04にDockerをインストールする方法