Hi Team,
I have few queries regarding stackstorm packs for stackstorm ha on kubernetes.
1)I figured out to how to create a docker image for service now and create a docker image and use it helm configuration
2)I am trying to copy the st2 packs from standalone server to the stackstorm ha in kubernetes.
The names are like test_ansible,hello_st2 etc
when I try to create a docker image gettign the error:
docker build -t st2packs_test:0.9 --build-arg PACKS=hello_st2 st2packs-image
2020-11-24 14:27:06,523 INFO [-] Installing pack “hello_st2”
2020-11-24 14:27:06,839 ERROR [-] Failed to install pack “hello_st2”: No record of the “hello_st2” pack
in the index.
The command ‘/bin/sh -c /opt/stackstorm/st2/bin/st2-pack-install ${PACKS}’ returned a non-zero code: 2
Is there a way I can add the name to the index ,if so how to do
[root@dc1udataocs301 st2packs-dockerfiles]# docker build -t st2packs_test:0.9 --build-arg PACKS=hello_st2
st2packs-image
Sending build context to Docker daemon 5.662MB
Step 1/7 : ARG PACKS=“file:///tmp/stackstorm-st2”
Step 2/7 : FROM stackstorm/st2packs:builder AS builder
Executing 2 build triggers
—> Using cache
—> Running in da4ddcebc38b
Removing intermediate container da4ddcebc38b
—> 3b1cdbeeb9ab
Step 3/7 : COPY packs/hello_st2 /tmp/stackstorm-st2/
—> 20edfa1b5f12
Step 4/7 : RUN ls -la /tmp/stackstorm-st2
—> Running in 04766987ebc3
total 12
drwxr-xr-x 7 root root 137 Nov 24 14:26 .
drwxrwxrwt 1 root root 28 Nov 24 14:26 …
drwxr-xr-x 2 root root 40 Aug 12 18:04 actions
drwxr-xr-x 2 root root 25 Aug 12 18:04 aliases
-rw-r–r-- 1 root root 3936 Aug 12 17:58 icon.png
-rw-r–r-- 1 root root 1285 Aug 12 17:58 pack.yaml
drwxr-xr-x 2 root root 65 Aug 12 18:04 policies
-rw-r–r-- 1 root root 9 Aug 12 17:58 requirements.txt
drwxr-xr-x 2 root root 24 Aug 12 18:04 rules
drwxr-xr-x 2 root root 44 Aug 12 18:04 sensors
Removing intermediate container 04766987ebc3
—> b685fd70a9da
Step 5/7 : RUN git config --global http.sslVerify false
—> Running in 8d38579121e3
Removing intermediate container 8d38579121e3
—> 4d6386076124
Step 6/7 : RUN /opt/stackstorm/st2/bin/st2-pack-install {PACKS}
---> Running in 24a099672558
2020-11-24 14:27:06,523 INFO [-] Installing pack "hello_st2"
2020-11-24 14:27:06,839 ERROR [-] Failed to install pack "hello_st2": No record of the "hello_st2" pack in the index.
The command '/bin/sh -c /opt/stackstorm/st2/bin/st2-pack-install {PACKS}’ returned a non-zero code: 2
3)I tried to create multiple st2packs eg:
docker build --build-arg PACKS=servicenow ansible jira -t st2:0.1 st2packs-image
but no luck then I tried
docker build -t st2packs_test:0.2 --build-arg PACKS=servicenow --build-arg PACKS=ansible --build-arg PACKS=jira st2packs-image
the command executes only the last one eg servicenow ,ansible and jira ,it takes only jira.
Also facing the issue for ansible pack when installed alone ,for standalone also was facing the issue
,then install gcc with
yum install gcc and it worked ,not sure how do it for docker
Step 1/7 : ARG PACKS=“file:///tmp/stackstorm-st2”
Step 2/7 : FROM stackstorm/st2packs:builder AS builder
Executing 2 build triggers
—> Using cache
—> Using cache
—> 16cc22f2cba9
Step 3/7 : COPY packs/hello_st2 /tmp/stackstorm-st2/
—> Using cache
—> 4b2b0294c1c7
Step 4/7 : RUN ls -la /tmp/stackstorm-st2
—> Using cache
—> d6125dc06c83
Step 5/7 : RUN git config --global http.sslVerify false
—> Using cache
—> 5b68c4ea031a
Step 6/7 : RUN /opt/stackstorm/st2/bin/st2-pack-install ${PACKS}
—> Running in 9e02c88c3d1d
2020-11-24 15:17:51,629 INFO [-] Installing pack “ansible”
2020-11-24 15:17:52,430 INFO [-] Successfully installed pack “ansible”
2020-11-24 15:17:52,431 INFO [-] Setting up virtualenv for pack “ansible”
2020-11-24 15:17:52,432 INFO [-] Virtualenv path “/opt/stackstorm/virtualenvs/ansible” doesn’t exist
error:
----------------------------------------
ERROR: Command “/opt/stackstorm/virtualenvs/ansible/bin/python -u -c ‘import setuptools,
tokenize;file=’”’"’/tmp/pip-install-stuuz20m/pykerberos/setup.py’"’"’;f=getattr(tokenize,
‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’,
‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record
/tmp/pip-record-em0jpki_/install-record.txt --single-version-externally-managed --compile
--install-headers /opt/stackstorm/virtualenvs/ansible/include/site/python3.6/pykerberos" failed with
error code 1 in /tmp/pip-install-stuuz20m/pykerberos/
WARNING: You are using pip version 19.1.1, however version 20.2.4 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
)
pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages (20.2.4)
docker build -t st2packs_test:0.2 --build-arg PACKS=servicenow --build-arg PACKS=jira --build-arg PACKS=ansible st2packs-image
docker build -t st2packs_test:0.2 --build-arg PACKS=ansible st2packs-image