Installing the host agent on Cloud Fundry

نسخ يتم دعمها

Steemالزنزانات المدعمة

نشر برنامج agent agent باستخدام اصدار BOSH

ملاحظة : هذه الصفحة لها أهميتها بالنسبة لك فقط اذا قمت باستخدام المصدر المفتوح Cloud Fundry ، على عكس منصة Pivos (المعروفة سابقا باسم Pivotal Cloud Fundry) ، أو تستخدم BOSH لنشر البرامج بخلاف Cloud Fundry. اذا كنت تقوم باستخدام Pivotal Platform و Pvotal Ops Manager ، فاننا ننصح بشدة باستخدام Monitoring Application Monitoring for Pivos Platform .

تقوم وحدة الازاحة باصدار اصدارات BOSH متاحة من خلال مستودع تخزين Artifactory عام. بدء الاتصال في مستودع التخزين يتطلب توثيق HTTP الأساسي ؛ استخدم_كاسم مستخدم ومفتاح Agent صحيح ككلمة سرية.

تحميل برنامج Incera Agent BOSH بالنسبة الى BOSH المخرج

عند تحميل الاصدار الوسيط ، قم بتحميله على مدير BOSH بواسطة تشغيل هذا الأمر :

bosh upload-release <path/to/agent-bosh-xyz.tar.gz>

تطبيق توصيفات تشغيل agent agent runtime

لنشر اصدار Intana Agent BOSH عبر المؤسسة الخاصة بك ، قم باستخدام BOSH توصيف التشغيل.

لنشر اصدار Intana Agent BOSH عبر وحدة النشر الخاصة بك ، قم بتنفيذ الخطوات التالية :

  1. فيymlالوثيقة التالية ، أدخل القيم الخاصة بالمجالات التي تم تعليمها(REQUIRED)و(Optional)التي تناسب استخدامك-الحالة.
  2. لتحميل توصيف runtime الى مخرج BOSH ، قم بتشغيلbosh update-runtime-config. بعد تعديل توصيف وقت التشغيل ، يتم اعتبار كل عمليات النشر قديمة.
  3. يقوم المدير بتطبيق التغييرات الخاصة بتوصيف وقت التشغيل على كل عملية نشر أثناء التشغيل التاليbosh deployلذلك الإنتشار.

    releases:
      - name: instana-agent
        version:
          # (REQUIRED) Fill in the value with the actual release version.
          # For example, if you downloaded the file
          # agent-bosh-1.157.31.tar.gz, the right value is: 1.157.31
    
    addons:
      - name: instana-agent-infrastructure
        jobs:
          - name: instana-agent
            release: instana-agent
            properties:
              tanzu:
                foundation:
                  id: # (REQUIRED) A technical ID to identify this foundation
                  name: # (REQUIRED) A name to identify this foundation
              instana:
                agent: &agent-configuration
                  mode: INFRASTRUCTURE
                  endpoint: # (REQUIRED) Instana ingress endpoint, e.g., ingress-red-saas.instana.io
                  endpoint_port: # (Optional) Instana ingress endpoint port, default is 443
                  key: # (REQUIRED) Fill this with the agent key for your Instana tenant unit
                  download_key: # (Optional) Download key for downloading agent updates.
                    # This is necessary only in special cases, like running a private update repository.
                    # If not specified, the agent will fall back to the value 'instana.agent.key'.
                  zone: # (Optional, not advised) the name of the zone of the host.
                    # If unspecified, the value of `tanzu.foundation.name` will be used instead.
    
                  # (Optional) Add further configurations for the Agent's configuration.yaml files.
                  # Activate support for the JREs used in the latest Java buildpacks
                  custom_configuration: |
    
                  # (Optional) Add more environment variables to be passed to the Instana agent.
                  # Experimental flags of the Instana agent are activated using environment variables.
                  # It is not advised to use these settings unless instructed by Instana's support.
                  # Each environment variable must be entered in a text line.
                  # This entire stanza can be omitted if there is no proxy between the Instana agents and the Instana backend
                  environment: |
                    USE_ATTACH_TOOLS=true
                  proxy:
                    type: # (Optional) Type of proxy to be used by the agent to connect to the Instana backend.
                    # Valid values are 'http' (works also for HTTPS proxies), 'socks4' and 'socks5'.
                    # Default is to use no proxy.
                    host: # (Optional) Hostname of the proxy server, e.g., 'my.proxy' (without protocol).
                      # This property is required if a value is set for 'instana.agent.proxy.type', and ignored otherwise.
                    port: # (Optional) Port of the proxy server.
                      # This property is required if a value is set for 'instana.agent.proxy.type', and ignored otherwise.
                    user: # (Optional) User to be used to authenticate against the proxy server.
                      # Default is not to use authentication.
                      # This property is ignored if 'instana.agent.proxy.type' has no value set.
                    password: # (Optional) Password to be used to authenticate against the proxy server.
                      # Default is not to use authentication.
                      # This property is ignored if 'instana.agent.proxy.type' or 'instana.agent.proxy.user' have no value set.
                    dns: # (Optional) If set to 'true', DNS will be used to resolve the proxy address.
                      # Default is 'true'.
                      # This property is ignored if 'instana.agent.proxy.type' has no value set.
                    updates:
                      mode:
                        dynamic # Whether the agent should update itself dynamically ("dynamic") or not ("static", default).
                        # Default is dynamic.
                      dynamic:
                        repository:
                          hostname:
                            artifact-public.instana.io # The hostname of the repository to tap for updates to agent and sensors.
                            # The agent will connect to the repository on port 80 and 443.
                          version: # (Optional) Which version of the updates pack to use without further updates (version pinning).
                            # This setting overrides 'instana.agent.updates.dynamic.frequency' and 'instana.agent.updates.dynamic.time'.
                          frequency:# (Optional) How often to update the agent.
                            # Valid values are "DAY" (default, means daily updates), "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY" and "SUNDAY".
                            # Default is 'DAY'.
                          time: # Time of day when the update is executed, expected in hh:mm format in UTC.
                            # Default is '04:30'.
        include:
          stemcell: &supported-linux-stemcells
            - alias: ubuntu-trusty
              os: ubuntu-trusty
            - alias: ubuntu-xenial
              os: ubuntu-xenial
            - alias: ubuntu-bionic
              os: ubuntu-bionic
            - alias: centos-7
              os: centos-7
        exclude:
          jobs:
            - name: garden
              release: garden-runc
      - name: instana-agent-apm
        jobs:
          - name: instana-agent
            release: instana-agent
            properties:
              instana:
                agent:
                  <<: *agent-configuration
                  mode: APM
        include:
          jobs:
            - name: garden
              release: garden-runc
          stemcell: *supported-linux-stemcells
    

للحصول على مزيد من المعلومات عن السياسات المحيطة بتعديلات البرنامج الوسيط ، ارجع الى صفحة مطبوعات ادارة الاستنساخ وادارة التعديل الفنية.

Configuring the Cloud Fundry Sensor

يكون وكيل Incanizent قادرا على استرجاع البيانات الخاصة بتطبيقات Cloud Fundry والمساحات والمؤسسات من Cloud Foundry API. يقوم Intana باستخدام هذه المعلومات لتشغيل الخصائص المرتبطة بوحدة Cloud Fundry مثل :

اذا تم توصيفه ، يستطيع كل agent agent أن يقوم بتجميع البيانات الضرورية من Cloud Fundry API. لكن ، قم بالتوصية Agent واحد فقط لتجميع البيانات في أي وقت. عند استخدام البلاط ، قمنا بجعل عملية التجميع آلية بطريقة شفافة ، باستخدام آلية انتخابات القيادة للحصول على العديد من عملاء InTANT في حالة الاستعداد لتجميع بيانات Cloud Fundry API ؛ وهذا يضمن استمرارية استرجاع البيانات من خلال ، على سبيل المثال ، التحديثات المتدرجة لعمليات نشر BOSH. ومع ذلك ، عند نشر وكيل Intasانة مباشرة عن طريق BOSH ، يجب أن يتم توصيف مجموعة أجهزة الاستشعار Cloud Fundry بشكل صريح ، ونحن ندعم الطرق التالية للقيام بذلك :

  1. مطلوب : Have the Instana agents running on the Cloud Controller virtual machines تجميع بيانات Cloud Foundry API via a BOSH runtime configuration
  2. * بيدق * صندوق مخصصinstance_group يتم تشغيل agents Agents التي تم توصيفها خصيصا لتجميع البيانات من Cloud Fundry APIs

coo-So-So on Cloud Controller

سيقوم توصيف التشغيل التالي باتاحة امكانية تشغيل Agents Agents في نسخ مختلفة من وحدة تحكم Cloud Controller لتجميع بيانات Cloud Foundry API ، والتي تقوم بتنسيقها في أي وقت من الأوقات من خلال آلية الانتخابات التي يتم اتاحتها بواسطةZooKeeperاصدار:

releases:
  - name: instana-agent
    version:# (REQUIRED) Fill in the value with the actual release version.
      # For example, if you downloaded the file
      # agent-bosh-1.157.31.tar.gz, the right value is: 1.157.31
  - name: zookeeper
    version: "0.0.10"
    url: "https://bosh.io/d/github.com/cppforlife/zookeeper-release?v=0.0.10"
    sha1: "a6d227abceebf1e3e68ce4a3cabf68b0b93165d2"

addons:
  - name: instana-cf-sensor
    jobs:
      - name: instana-agent-configuration-cf-sensor
        release: instana-agent
        properties:
          tanzu:
            foundation:
              id: # (REQUIRED) A technical ID to identify this foundation
              name: # (REQUIRED) A name to identify this foundation
          cf:
            uaa:
              client: # (REQUIRED) A UAA client that has the 'cloud_controller.admin_read_only' authorities
              client_secret: # (REQUIRED) Client secret matching the above client
      - name: zookeeper
        release: zookeeper
        properties:
          leader_serves: "yes"
          # 42600 is the legacy leadership election port and we wanna avoid incompatibilities over update
          leader_election_port: 42601
          quorum_port: 42602
    include:
      jobs:
        - name: cloud_controller_ng
          release: capi

كما ترون أعلاه ، وكيل Intana يحتاج الى وحدة تابعة ل ـ Cloud Fundry's User Account and Authorization (UAA) باستخدامcloud_controller.admin_read_onlyالصلاحية ، التي يمكن تكوينها اما :

releases:
  - name: instana-agent
    version:# (REQUIRED) Fill in the value with the actual release version.
      # For example, if you downloaded the file
      # agent-bosh-1.157.31.tar.gz, the right value is: 1.157.31

addons:
  - name: instana-ensure-uaa-client
    jobs:
      - name: instana-ensure-uaa-client
        release: instana-agent
        properties:
          cf:
            uaa:
              client: # (REQUIRED) This entry must match the one of the `cf.uaa.client` property of the `instana-cf-sensor` runtime configuration
              client_secret: # (REQUIRED) This entry must match the one of the `cf.uaa.client_secret` property of the `instana-cf-sensor` runtime configuration
    include:
      jobs:
        - name: uaa
          release: uaa

الطريقة الموصى باستخدامها باستخدامinstana-ensure-uaa-clientيكون للعملية المنفعة التي تم اضافتها للتأكد من أن UAAclientيتم اعادة تكوينه آليا اذا تم حذفه بواسطة الخطأ. لاحظ أنinstana-ensure-uaa-clientيجب أن يتم ايجادها على الأجهزة الافتراضية التي تقوم بتشغيلuaaوظيفة ، من أجل استخدام بيانات الاعتماد المتاحة هناك.

Dedicated instance group

ومن الممكن نشر عناصر غير مخصصة لهذا النظام تم تهيئتها لتشغيل جهاز استشعار الأرض السحابي من خلال تكوين مجموعة نسخة مخصصة BOSH. ولكننا لا ننصح بذلك ، لأنه يؤدي إلى هدر كبير للموارد الحاسوبية : فالعمل الذي يقوم به جهاز الاستشعار خفيف الوزن ، وهو ببساطة مبالغة في القتل لمجموعة من الأجهزة الافتراضية المخصصة له. على أية حال ، سينتج عن توصيف التشغيل التالي مجموعة نسخة بجهاز ظاهري واحد مخصص :

---
name: instana-cf-sensor

stemcells:
  - alias: &stemcell_name bosh-aws-xen-hvm-ubuntu-xenial-go_agent
    os: ubuntu-xenial
    version: "621.29"

releases:
  - name: instana-agent
    version: <instana-agent-bosh-release-version>

instance_groups:
  - name: instana-cf-sensor
    azs: ...
    instances: 1
    jobs:
      - name: instana-agent-configuration-cf-sensor
        release: instana-agent
        properties:
          cf:
            api:
              url: <TODO> # e.g., https://api.sys.mypcf.qainfra.instana.io
            uaa:
              url: <TODO> # e.g., https://uaa.sys.mypcf.qainfra.instana.io
              client: <TODO>
              client_secret: <TODO>
    vm_type: t3.micro
    stemcell: *stemcell_name
    networks:
      # Your network setup may look different
      - default:
          - dns
          - gateway
        name: instana-cf-sensor

update:
  canaries: 1
  canary_watch_time: 30000-300000
  max_errors: 2
  max_in_flight: 1
  serial: false
  update_watch_time: 30000-300000

ملاحظات:

  1. مجموعة النسخ هذه تتضمن نسخة واحدة. اذا كنت ترغب في زيادة حجمها الى أكثر من نسخة واحدة ، لكي تكون مرنة خلال التحديثات المتدرجة ، يجب أن تقوم بنشرها على الأجهزة.ZooKeeperعملية من homnonymousZooKeeperإطلاق. و#instana-agent-configuration-cf-sensorسيكتشف تلقائيا وجود آلية انتخابات القيادة (عن طريق وصلات BOSH) وسيعتمدها بشفافية.
  2. سيكون من الضروري توصيف URI الخاص ب ـUAA و Cloud Fundry APIs يدويا. وهذا يعني أنه يمكنك تقنيا تشغيل هذا النشر في شبكة مختلفة تماما وحتى منطقة الاتاحة من تلك التي يتم استخدامها بواسطة نشر Cloud Fundry.
  3. سيكون من الضروري تكوين الوحدة التابعة UAA ومطابقة سر الوحدة التابعة معcloud_controller.admin_read_onlyتصريح ، كما هو موضح في صفحة تكوين وادارة المستخدمين باستخدام UAA CLI (UOC) الخاصة بالمطبوعات الفنية الى Cloud Fundry.

ازالة توصيفات وقت تشغيل البرنامج الوسيط

لازالة توصيف Intana runtime ، قم بتحميل ما يلي من خلال تشغيلbosh update-runtime-configالأمر:

releases: []
addons: []

بعد تعديل توصيف التشغيل ، سيتم ازالة اصدار Intana Agent BOSH خلال الفترة التاليةbosh deployلكل عملية نشر. عندما يتم تعديل كل عمليات النشر لازالة أعمال Intana Agent BOSH ، نوصي بأن تقوم بتشغيلbosh clean-upالأمر الخاص بازالة الاصدار غير الضروري الآن والعناصر الخاصة به من BOSH Director.