-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from yast/use-cockpit
Replace yastd-proxy with cockpit infrastructure
- Loading branch information
Showing
32 changed files
with
5,271 additions
and
9,774 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Development Notes | ||
|
||
## Development Mode | ||
|
||
As explained in the [main README](README.md), you can run the web UI in *development mode*, so the | ||
code gets reloaded everytime you make a change. In that scenario, the code is served by `npm` | ||
instead of `cockpit-ws`. | ||
|
||
However, the UI needs to access `cockpit-ws` through a different port to log in and interact with | ||
the underlying system. It happens automatically thanks to a [proxy](./web/src/setupProxy.js) which | ||
is configured automatically. If you need to proxy other URLs, just add them to the configuration. | ||
|
||
## npm start | ||
|
||
`npm start` cleans up the screen during the initialization. It might cause that you miss some | ||
important messages, like the proxy configuration. If you need to check those messages, you can | ||
use this command instead: | ||
|
||
$ COLOR=1 npm start | cat |
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 |
---|---|---|
@@ -1,14 +1,25 @@ | ||
#! /bin/sh | ||
sudo zypper --non-interactive install gcc gcc-c++ make openssl-devel ruby-devel npm git augeas-devel || exit 1 | ||
sudo zypper --non-interactive install gcc gcc-c++ make openssl-devel ruby-devel \ | ||
npm git augeas-devel cockpit || exit 1 | ||
|
||
git clone https://github.com/yast/the-installer || exit 1 | ||
cd the-installer | ||
|
||
# set up yastd | ||
sudo cp yastd/share/dbus-yastd.conf /etc/dbus-1/system.d/yastd.conf | ||
cd yastd; bundle config --set local path vendor/bundle; bundle install; cd - | ||
cd yastd-proxy; bundle config --set local path vendor/bundle; bundle install; cd - | ||
cd web; npm install; cd - | ||
cd yastd; sudo bundle exec bin/yastd& cd - | ||
cd yastd-proxy; bundle exec bin/yastd-proxy& cd - | ||
cd web; npm start& cd - | ||
cd yastd; sudo bundle.ruby3.1 exec bin/yastd& cd - | ||
|
||
# set up the web UI | ||
cd web; npm install; npm run build; cd - | ||
sudo mkdir /usr/share/cockpit/static/installer | ||
sudo mount -o bind web/build /usr/share/cockpit/static/installer | ||
sudo systemctl start cockpit | ||
|
||
# set 'linux' as password | ||
echo "linux:Nk1RhI1GqlxdA | sudo chpasswd -e linux | ||
# open the installer | ||
xdg-open http://localhost:9090/cockpit/static/installer/index.html | ||
wait |
Oops, something went wrong.