1.3. Ansible Automation Platform과 자동화 대시보드 통합


Ansible Automation Platform 인스턴스를 자동화 대시보드 구성에 통합하여 데이터를 수집 및 시각화하고 자동화에 대한 통찰력을 얻습니다.

프로세스

  1. Red Hat Enterprise Linux 호스트의 https 포트 8447에서 자동화 대시보드가 실행되고 있는지 확인합니다.

    참고
    • 이 확인에는 Ansible Automation Platform 로그인 세부 정보가 필요합니다.
    • 포트 8447은 기본적으로 활성화되어 있지만 구성 가능합니다.
  2. 다음 정보를 사용하여 Ansible Automation Platform 인스턴스를 cluster.yaml 에 추가합니다.

    • 프런트 엔드 액세스를 위한 Ansible Automation Platform URL/포트
    • 읽기 액세스를 위해 사전 구성된 Ansible Automation Platform OAuth 액세스 토큰 및 새로 고침
    • OAuth2 클라이언트 인증 정보

      참고

      Ansible Automation Platform에 액세스할 수 없는 경우 관리자에게 문의하십시오.

  3. 개인 액세스 토큰을 구성합니다. 자세한 내용은 토큰 기반 인증을 사용하여 외부 애플리케이션에 대한 액세스 구성 을 참조하십시오.
  4. 액세스 토큰을 구성한 후 다음 명령을 실행합니다.

    cp clusters.example.yaml clusters.yaml
    vi clusters.yaml
    Copy to Clipboard Toggle word wrap
  5. 다음을 사용하여 데이터를 가져오고 결합하기 위해 Automation Dashboard 구성에 하나 이상의 Ansible Automation Platform 인스턴스(동일한 Ansible Automation Platform 버전)를 추가할 수 있습니다.

    참고

    하나의 Ansible Automation Platform 인스턴스만 있는 경우 두 번째 항목을 제거합니다.

    ---
    clusters:
      - protocol: https			<--- Normally https
        address: my-aap.example.com  <--- Can use IP or FQDN without http(s)://
        port: 443				<--- Normally 443
        access_token: sampleToken	<--- Your preconfigured Ansible Automation Platform read access token
      Platform read access token
        refresh_token: myRefreshToken
        client_id: myClientID
        client_secret: myClientSecret
        verify_ssl: false		<--- Can be used when using self signed certs
        sync_schedules:
          - name: Every 5 minutes sync
            rrule: DTSTART;TZID=Europe/Ljubljana:20250630T070000 FREQ=MINUTELY;INTERVAL=5
            enabled: true
    
      - protocol: https
        address: aap2.example.com
        port: 443
        access_token: WRn2swiqg5spEwUndDkrJoCeg4Qwuw
        verify_ssl: true
        sync_schedules:
          - name: Every 5 minutes sync
            rrule: DTSTART;TZID=Europe/Ljubljana:20250630T070000 FREQ=MINUTELY;INTERVAL=5
            enabled: true
    Copy to Clipboard Toggle word wrap
    참고

    access_token,refresh_token, client_secret 은 Automation Dashboard 데이터베이스에 저장됩니다. 이러한 값은 보안을 위해 암호화됩니다.

  6. 다음 명령을 실행하여 자동화 대시보드 구성을 로드하고 활성화합니다.

    podman cp clusters.yaml automation-dashboard-web:/
    podman exec automation-dashboard-web /venv/bin/python ./manage.py setclusters /clusters.yaml
    Copy to Clipboard Toggle word wrap
    참고

    Automation Dashboard는 현재 토큰이 만료될 때 refresh_token ,client_id, client_secret 을 사용하여 새 access_token 및 refresh_token을 자동으로 가져옵니다. 유틸리티는 ping 끝점을 사용하여 Ansible Automation Platform 버전을 감지하고 올바른 토큰 새로 고침 끝점을 찾습니다.

    podman exec automation-dashboard-web /venv/bin/python ./manage.py setclusters /clusters.yaml
    Check if table exists.
    Reading YML file.
    Adding cluster: address=my-aap.example.com
    
    INFO 2025-05-20 09:55:00,926 connector 187 140208297051968 Checking if is AAP 2.4 at https://my-aap.example.com:443
    INFO 2025-05-20 09:55:00,926 connector 187 140208297051968 Pinging api https://my-aap.example.com:443/api/v2/ping/
    INFO 2025-05-20 09:55:00,926 connector 187 140208297051968 Executing GET request to https://my-aap.example.com:443/api/v2/ping/
    
    ERROR 2025-05-20 09:55:00,032 connector 301 140025281152832 GET request failed with status 404
    Successfully set up AAP clusters
    Copy to Clipboard Toggle word wrap
    참고

    Automation Dashboard는 Ansible Automation Platform 2.4, 2.5 및 2.6 인스턴스를 확인합니다. 예제 출력에 표시된 대로 404 오류가 발생할 수 있습니다. 오류에 대한 자세한 내용은 이 장의 확인 섹션을 참조하십시오.

  7. 다음 명령을 사용하여 데이터를 수동으로 가져와서 자동화 대시보드 구성을 테스트합니다.

    podman exec -it automation-dashboard-web /venv/bin/python ./manage.py syncdata --since=2025-04-01 --until=2025-06-01
    Successfully created Sync task for Cluster https://my-aap.example.com:443.
    Copy to Clipboard Toggle word wrap
    참고

    테스트 시간을 줄이기 위해 짧은 날짜 간격을 사용하는 것이 좋습니다. 형식은 YYYY-MM-DD입니다.

    그런 다음 journalctl 을 사용하여 진행 상황을 확인할 수 있습니다.

    sudo journalctl -fn10
    Copy to Clipboard Toggle word wrap
  8. 브라우저를 새로 고침하여 자동화 대시보드 내에서 검색된 데이터를 확인합니다.

1.3.1. 클러스터 액세스 토큰 확인

클러스터 데이터를 구성하고 로드한 후 디버깅을 위해 저장된 액세스 토큰을 확인합니다.

프로세스

  1. getclusters 관리 명령을 --decrypt 옵션과 함께 사용하여 저장된 access_tokenrefresh_token 을 일반 텍스트로 표시합니다.
  2. automation-dashboard-web 컨테이너 내에서 다음 명령을 실행합니다.

    podman exec -it automation-dashboard-web /venv/bin/python ./manage.py getclusters --decrypt
    Copy to Clipboard Toggle word wrap
  3. 출력을 검토하여 저장된 토큰이 올바르고 최신 상태인지 확인합니다.

clusters:
  - protocol: https
    address: my-aap.example.com
    port: 443
    access_token: sampleToken
    refresh_token: myRefreshToken
    client_id: myClientID
    client_secret: myClientSecret
    verify_ssl: false
    sync_schedules:
      - name: Every 5 minutes sync
        rrule: DTSTART;TZID=Europe/Ljubljana:20250630T070000 FREQ=MINUTELY;INTERVAL=5
        enabled: true
Copy to Clipboard Toggle word wrap

참고

디버깅을 위해 암호화된 access_tokenrefresh_token 을 일반 텍스트에 표시하려면 --decrypt 플래그가 필요합니다. 비보안 시스템에서는 이 명령을 사용하지 마십시오.

./manage.py getclusters --decrypt 로 생성된 출력을 파일 cluster .yaml에 작성하고 이를 . /manage.py setclusters cluster.yaml 의 입력으로 사용할 수 있습니다.

검증

설치 중에 오류 메시지가 표시되면 다음 표를 참조하십시오.

Expand

문제

가능한 원인

해결책

401 오류

잘못된 인증 정보 또는 토큰과 같은 인증 오류를 나타내는 무단 액세스 메시지입니다.

cluster .yaml에서 액세스 토큰이 올바른지 확인합니다.

401 오류

토큰이 만료되면 일시적인 401 오류가 예상되는 다음 즉시 새로 고침을 시도합니다.

자동 토큰 새로 고침이 실패하는 경우(예: 유효하지 않은 client_secret 또는 refresh_token) getclusters --decrypt 명령을 사용하여 데이터베이스에 저장된 인증 정보가 소스 clusters.yaml 파일에 일치하는지 수동으로 확인합니다. 일치하지 않는 경우 올바른 구성으로 setclusters 명령을 다시 실행합니다. 새로 고침 토큰을 한 번만 사용할 수 있습니다. 유효하지 않은 액세스 토큰으로 인해 setclusters 를 실행해야 하는 경우 새 액세스 및 새로 고침 토큰을 생성하고 소스 cluster .yaml 에서 사용합니다.

404 오류

이는 항목이 올바르게 구성되지 않았거나 올바른 엔드포인트를 가리키는 "찾을 수 없음" 메시지입니다.

cluster .yaml 에 사용된 Ansible Automation Platform 인스턴스 URL이 올바른지 확인합니다.

성공적으로 설치하려면 다음 세 가지 컨테이너 서비스를 실행해야 합니다.

podman ps --all --format "{{.Names}}"

postgresql
automation-dashboard-task
automation-dashboard-web
Copy to Clipboard Toggle word wrap

다음을 실행하여 컨테이너 로그를 확인할 수 있습니다.

journalctl CONTAINER_NAME=container (where container equals one of postgresql automation-dashboard-task or automation-dashboard-web)

For example:
journalctl CONTAINER_NAME=automation-dashboard-task
May 22 13:02:07 automation-dashboard automation-dashboard-task[1607]: [wait-for-migrations-dashboard.sh] Waiting for database migrations...
May 22 13:02:07 automation-dashboard automation-dashboard-task[1607]: [wait-for-migrations-dashboard.sh] Attempt 1
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,636 periodic 2 140568371550016 Starting sync task.
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,636 periodic 2 140568371550016 Retrieving clusters inform>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,747 periodic 2 140568371550016 Retrieved 1 clusters.
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 periodic 2 140568371550016 Retrieving data from clust>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Checking Ansible Automation Platform version at h>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Checking if is Ansible Automation Platform 2.5 at>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Pinging api https://ec2-3>
May 22 13:02:10 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:10,761 connector 2 140568371550016 Executing GET request to >
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: ERROR 2025-05-22 13:02:13,820 connector 2 140568371550016 GET request failed with >
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:13,821 connector 2 140568371550016 Checking if is Ansible Automation Platform 2.4 at>
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:13,821 connector 2 140568371550016 Pinging api https://ec2-3>
May 22 13:02:13 automation-dashboard automation-dashboard-task[1607]: INFO 2025-05-22 13:02:13,821 connector 2 140568371550016 Executing GET request to >
May 22 13:02:16 automation-dashboard automation-dashboard-task[1607]: ERROR 2025-05-22 13:02:16,892 connector 2 140568371550016 GET request failed with ...
Copy to Clipboard Toggle word wrap

다음 로그 스니펫에서는 성공적인 토큰 새로 고침을 보여줍니다.

참고

이 로그 스니펫에서는 간결성을 위해 타임스탬프 및 호스트 이름을 생략합니다.

journalctl CONTAINER_NAME=automation-dashboard-task
INFO Checking if is AAP 2.5 ... 2.6 at https://app.example.com:443
INFO Pinging api https://app.example.com:443/api/gateway/v1/ping/
INFO Detected AAP version AAP 2.6 at https://app.example.com:443
INFO Executing GET request to https://app.example.com:443/api/controller/v2/organizations/?page_size=100&page=1
ERROR GET request failed with status 401
INFO Token refresh POST request succedded with status 201
ERROR GET after reauth response.status_code=200
INFO Executing GET request to https://app.example.com:443/api/controller/v2/job_templates/?page_size=200&page=1
Executing GET request to https://app.example.com:443/api/controller/v2/jobs/?page_size=100&page=1&order_by=finished&finished__gt=2025-10-23T13:01:09.768681Z
Copy to Clipboard Toggle word wrap

systemd 를 사용하여 서비스가 실행되는 방식을 확인합니다.

systemctl status --user

● automation-dashboard
    State: running
    Units: 76 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 2025-05-22 13:02:07 UTC; 22min ago
  systemd: 252-51.el9
   CGroup: /user.slice/user-1000.slice/user@1000.service
           ├─app.slice
           │ ├─automation-dashboard-task.service
           │ │ └─1607 /usr/bin/conmon --api-version 1 -c 84e46532e8ca31b0cadb037479289d030103aa01b7a1591e62b83b17f031e47d -u 84e46532e8ca31b0cadb037479>
           │ ├─automation-dashboard-web.service
           │ │ └─1608 /usr/bin/conmon --api-version 1 -c d060f3e3fb2b4c4c5c588149253beed83c78ccc9c9a8c1bf4c96157142a210dc -u d060f3e3fb2b4c4c5c58814925>
           │ ├─dbus-broker.service
           │ │ ├─1621 /usr/bin/dbus-broker-launch --scope user
           │ │ └─1624 dbus-broker --log 4 --controller 9 --machine-id 612db98503014199bfd8c788c8d3da58 --max-bytes 100000000000000 --max-fds 2500000000>
           │ └─postgresql.service
           │   └─1614 /usr/bin/conmon --api-version 1 -c eec61745cb6fc3a89a4f7475d7ef63b5899699157d943c2f16a3243311927bef -u eec61745cb6fc3a89a4f7475d7>
           ├─init.scope
           │ ├─1093 /usr/lib/systemd/systemd --user
           │ └─1128 "(sd-pam)"
           └─user.slice
             ├─libpod-84e46532e8ca31b0cadb037479289d030103aa01b7a1591e62b83b17f031e47d.scope
             │ └─container
             │   ├─1619 /usr/bin/dumb-init -- /usr/bin/launch_dashboard_task.sh
             │   └─1681 /venv/bin/python periodic.py
             ├─libpod-d060f3e3fb2b4c4c5c588149253beed83c78ccc9c9a8c1bf4c96157142a210dc.scope
             │ └─container
             │   ├─1617 /usr/bin/dumb-init -- /usr/bin/launch_dashboard_web.sh
             │   ├─1646 /usr/bin/python3.9 /usr/local/bin/supervisord -c /etc/supervisord_dashboard_web.conf
             │   ├─1877 /bin/bash /usr/local/bin/stop-supervisor
             │   ├─1878 "nginx: master process nginx -g daemon off;"
             │   ├─1879 /venv/bin/uwsgi /etc/tower/uwsgi.ini
             │   ├─1880 "nginx: worker process"
             │   ├─1881 "nginx: worker process"
             │   ├─1882 "nginx: worker process"
             │   ├─1883 "nginx: worker process"
             │   ├─1884 /venv/bin/uwsgi /etc/tower/uwsgi.ini
             │   ├─1885 /venv/bin/uwsgi /etc/tower/uwsgi.ini
             │   ├─1886 /venv/bin/uwsgi /etc/tower/uwsgi.ini
             │   ├─1887 /venv/bin/uwsgi /etc/tower/uwsgi.ini
             │   └─1888 /venv/bin/uwsgi /etc/tower/uwsgi.ini
             ├─libpod-eec61745cb6fc3a89a4f7475d7ef63b5899699157d943c2f16a3243311927bef.scope
             │ └─container
             │   ├─1623 postgres
             │   ├─1869 "postgres: logger "
             │   ├─1871 "postgres: checkpointer "
             │   ├─1872 "postgres: background writer "
             │   ├─1873 "postgres: walwriter "
             │   ├─1874 "postgres: autovacuum launcher "
             │   ├─1875 "postgres: stats collector "
             │   ├─1876 "postgres: logical replication launcher "
             │   └─1889 "postgres: aapdashboard aapdashboard 172.31.28.99(39338) idle"
             └─podman-pause-b6c4e853.scope
               └─1359 catatonit -P
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat