-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove references to the dev namespace of ke command
- Loading branch information
Showing
4 changed files
with
46 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ dependencies on our local machine. Instead we can use a developer container, | |
and in fact our Generic IOC *is* our developer container. | ||
|
||
When the CI builds a Generic IOC it creates | ||
`two targets <https://github.com/orgs/epics-containers/packages?repo_name=ioc-adsimdetector>`_: | ||
`two targets <https://github.com/orgs/epics-containers/packages?repo_name=ioc-adsimdetector>`_ | ||
|
||
:developer: this target installs all the build tools and build time dependencies | ||
into the container image. It then compiles the support modules and IOC. | ||
|
@@ -82,9 +82,14 @@ The next section will show you how to use this feature. Note that you can use | |
any IDE that supports remote development in a container, you could also | ||
simply launch the developer container in a shell and use it via CLI only. | ||
|
||
TODO: add features to ``ec dev`` to launch the container in developer mode, | ||
with appropriate host mounts. This will enable non vscode users developer | ||
containers. | ||
If you want to use the CLI and terminal based editors like ``neovim`` then | ||
you should use the developer container CLI to get your developer container | ||
started. This means the configuration in ``.devcontainer/devcontainer.json`` | ||
is used to start the container. This is necessary as that is where the | ||
useful host filesystem mounts and other config items are defined. See | ||
`devcontainer-cli <https://code.visualstudio.com/docs/devcontainers/devcontainer-cli>`_ | ||
for details. | ||
|
||
|
||
Starting a Developer Container | ||
------------------------------ | ||
|
@@ -95,10 +100,10 @@ Starting a Developer Container | |
|
||
There is a | ||
`bug in VSCode devcontainers extension <https://github.com/microsoft/vscode-remote-release/issues/8557>`_ | ||
at the time of writing | ||
that makes it incompatible with podman and an SELinux enabled /tmp directory. | ||
This will affect most Redhat users and you will see an error regarding | ||
permissions on the /tmp folder when VSCode is building your devcontainer. | ||
at the time of writing that makes it incompatible with podman and an SELinux | ||
enabled /tmp directory. This will affect most Redhat users and you will see an | ||
error regarding permissions on the /tmp folder when VSCode is building your | ||
devcontainer. | ||
|
||
Here is a workaround that disables SELinux labels in podman. | ||
Paste this into a terminal: | ||
|
@@ -110,37 +115,29 @@ Starting a Developer Container | |
Preparation | ||
~~~~~~~~~~~ | ||
|
||
For this section we will work with the ADSimDetector Generic IOC that we | ||
used in previous tutorials. Let's go and fetch a version of the Generic IOC | ||
source and build it locally. | ||
For this section we will work with the ADSimDetector Generic IOC that we used in | ||
previous tutorials. Let's go and fetch a version of the Generic IOC source and | ||
build it locally. | ||
|
||
For the purposes of this tutorial we will place the source in a folder right | ||
next to your test beamline ``bl01t``: | ||
|
||
.. code-block:: bash | ||
# starting from folder bl01t so that the clone is next to bl01t | ||
cd .. | ||
git clone --recursive [email protected]:epics-containers/ioc-adsimdetector.git | ||
cd ioc-adsimdetector | ||
ec dev build | ||
The last step uses one of the ``ec dev`` sub commands to build the developer | ||
target of the container to your local container cache. This will take a few | ||
minutes to complete. A philosophy of epics-containers is that Generic IOCs | ||
build all of their own support. This is to avoid problematic dependency trees. | ||
For this reason building something as complex as AreaDetector will take a | ||
few minutes when you first build it. | ||
|
||
A nice thing about containers is that the build is | ||
cached so that a second build will be almost instant unless you have changed | ||
something that requires some steps to be rebuilt. | ||
# starting from folder bl01t so that the clone is next to bl01t | ||
cd .. | ||
git clone [email protected]:epics-containers/ioc-adsimdetector.git | ||
cd ioc-adsimdetector | ||
./build | ||
The ``ec dev`` commands are a set of convenience commands | ||
for working on Generic IOCs from *outside* of the container. These commands | ||
are useful for debugging container builds: although most work is done inside | ||
the container, you will need these commands if it fails to build. | ||
This will take a few minutes to complete. A philosophy of epics-containers is | ||
that Generic IOCs build all of their own support. This is to avoid problematic | ||
dependency trees. For this reason building something as complex as AreaDetector | ||
will take a few minutes when you first build it. | ||
|
||
A nice thing about containers is that the build is cached so that a second build | ||
will be almost instant unless you have changed something that requires some | ||
steps to be rebuilt. | ||
|
||
.. note:: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters