Closed secondsun closed 4 years ago
And there is no answer.... @sdodson can you replay someone to this issue? There is no actual information about ASB in Github or OKD\OCP documentation
@jwmatthews Do you know who could field this question?
I tried to follow the instructions too, which are really out dated, and update them as I go. I got to this point, but I couldn't get apb bundle list to work, so I got stuck:
diff --git a/apb_devel/writing/getting_started.adoc b/apb_devel/writing/getting_started.adoc
index 9b626aa..4f58de3 100644
--- a/apb_devel/writing/getting_started.adoc
+++ b/apb_devel/writing/getting_started.adoc
@@ -57,7 +57,7 @@ link:https://github.com/ansibleplaybookbundle/hello-world-apb[*hello-world-apb*]
the skeleton for your APB. The command for this is simple:
+
----
-$ apb init my-test-apb
+$ ansible-galaxy init --type=apb my-test-apb
----
+
After initialization, you will see the following file structure:
@@ -66,17 +66,28 @@ After initialization, you will see the following file structure:
----
my-test-apb/
├── apb.yml
+├── defaults
+│ └── main.yml
├── Dockerfile
+├── files
+├── handlers
+│ └── main.yml
+├── Makefile
+├── meta
+│ └── main.yml
├── playbooks
-│ ├── deprovision.yml
-│ └── provision.yml
-└── roles
- ├── deprovision-my-test-apb
- │ └── tasks
- │ └── main.yml
- └── provision-my-test-apb
- └── tasks
- └── main.yml
+│ ├── deprovision.yml
+│ └── provision.yml
+├── README.md
+├── tasks
+│ └── main.yml
+├── templates
+├── tests
+│ ├── ansible.cfg
+│ ├── inventory
+│ └── test.yml
+└── vars
+ └── main.yml
----
+
Two files were created at the root directory: an *_apb.yml_* (the APB spec file)
@@ -89,13 +100,13 @@ xref:reference.adoc#apb-devel-writing-ref-dockerfile[*_Dockerfile_*].
.*_apb.yml_*
[source,yaml]
----
-version: 1.0
+version: '1.0.0'
name: my-test-apb
-description: This is a sample application generated by apb init
+description: your description
bindable: False
async: optional
metadata:
- displayName: my-test
+ displayName: my-test-apb
plans:
- name: default
description: This default plan deploys my-test-apb
@@ -109,9 +120,10 @@ plans:
FROM ansibleplaybookbundle/apb-base
LABEL "com.redhat.apb.spec"=\
+""
COPY playbooks /opt/apb/actions
-COPY roles /opt/ansible/roles
+COPY . /opt/ansible/roles/my-test-apb
RUN chmod -R g=u /opt/{ansible,apb}
USER apb
----
@@ -126,11 +138,11 @@ FROM openshift3/apb-base
----
.. Update `com.redhat.apb.spec` in the `LABEL` instruction with a base64 encoded
-version of *_apb.yml_*. To do this, run `apb prepare`:
+version of *_apb.yml_*. To do this, run `apb bundle prepare`:
+
----
$ cd my-test-apb
-$ apb prepare
+$ apb bundle prepare
----
+
This updates the *_Dockerfile_* as follows:
@@ -140,37 +152,54 @@ This updates the *_Dockerfile_* as follows:
FROM openshift3/apb-base
LABEL "com.redhat.apb.spec"=\
-"dmVyc2lvbjogMS4wCm5hbWU6IG15LXRlc3QtYXBiCmRlc2NyaXB0aW9uOiBUaGlzIGlzIGEgc2Ft\
-cGxlIGFwcGxpY2F0aW9uIGdlbmVyYXRlZCBieSBhcGIgaW5pdApiaW5kYWJsZTogRmFsc2UKYXN5\
-bmM6IG9wdGlvbmFsCm1ldGFkYXRhOgogIGRpc3BsYXlOYW1lOiBteS10ZXN0CnBsYW5zOgogIC0g\
-bmFtZTogZGVmYXVsdAogICAgZGVzY3JpcHRpb246IFRoaXMgZGVmYXVsdCBwbGFuIGRlcGxveXMg\
-bXktdGVzdC1hcGIKICAgIGZyZWU6IFRydWUKICAgIG1ldGFkYXRhOiB7fQogICAgcGFyYW1ldGVy\
-czogW10="
+"dmVyc2lvbjogJzEuMC4wJwpuYW1lOiBteS10ZXN0LWFwYgpkZXNjcmlwdGlvbjogeW91ciBkZXNj\
+cmlwdGlvbgpiaW5kYWJsZTogRmFsc2UKYXN5bmM6IG9wdGlvbmFsCm1ldGFkYXRhOgogIGRpc3Bs\
+YXlOYW1lOiBteS10ZXN0LWFwYgpwbGFuczoKICAtIG5hbWU6IGRlZmF1bHQKICAgIGRlc2NyaXB0\
+aW9uOiBUaGlzIGRlZmF1bHQgcGxhbiBkZXBsb3lzIG15LXRlc3QtYXBiCiAgICBmcmVlOiBUcnVl\
+CiAgICBtZXRhZGF0YToge30KICAgIHBhcmFtZXRlcnM6IFtd"
COPY playbooks /opt/apb/actions
-COPY roles /opt/ansible/roles
+COPY . /opt/ansible/roles/my-test-apb
RUN chmod -R g=u /opt/{ansible,apb}
USER apb
----
-. At this point, you have a fully formed APB that you can build. If you skipped
-using `apb prepare`, the `apb build` command will still prepare the APB before
-building the image:
+. At this point, you have a fully formed APB that you can build. APB gets built
+and uploaded to registry by using oc commands:
+
----
-$ apb build
+$ oc new-build --binary=true --name my-test-apb
+$ oc start-build --follow --from-dir . my-test-apb
----
-. You can now push the new APB image to the local OpenShift Container Registry:
+. APB will not come visible into catalog without telling OpenShift Ansible
+Service Broker (ASB) to look for it. It happens by whitelisting the local
+registry in ASB config map at broker config page:
+https://<master url>/console/project/openshift-ansible-service-broker/browse/config-maps/broker-config
+
----
-$ apb push
+registry:
+- type: local_openshift
+ name: lo
+ namespaces:
+ - openshift
+ white_list:
+ - ".*-apb$"
+----
++
+For that to take effect, you need to restart ASB and service catalog:
++
----
+oc rollout latest dc/asb -n openshift-ansible-service-broker
+oc delete pod -n kube-service-catalog --selector=app=controller-manager
+----
++
+And wait a bit for pods to come up, do scraping and catalog to list the item.
. Querying the OAB will now show your new APB listed:
+
----
-$ apb list
+$ apb bundle list
ID NAME DESCRIPTION
< ------------ ID -------------> dh-my-test-apb This is a sample application generated by apb init
----
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
Which section(s) is the issue in?
APB Devel CLI tooling https://github.com/openshift/openshift-docs/blob/master/apb_devel/cli_tooling.adoc
What needs fixing?
apb build, init, and push are all deprecated when using apb (installed via the fedora instructions).
When I run
apb init
I getWhen I run
apb build
I getWhen I run
apb push
I getThe newer documentation seems to be here : https://github.com/automationbroker/apb/blob/master/docs/getting_started.md